Files
MaaAssistantArknights/.github/workflows/website-workflow.yml
dependabot[bot] 8276849f1a ci:将 /.github/workflows 中的 github-actions 组更新 2 次 (#17163)
Bumps the github-actions group in /.github/workflows with 2 updates: [actions/checkout](https://github.com/actions/checkout) and [softprops/action-gh-release](https://github.com/softprops/action-gh-release).


Updates `actions/checkout` from 6 to 7
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v6...v7)

Updates `softprops/action-gh-release` from 3.0.0 to 3.0.1
- [Release notes](https://github.com/softprops/action-gh-release/releases)
- [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md)
- [Commits](https://github.com/softprops/action-gh-release/compare/v3.0.0...v3.0.1)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: softprops/action-gh-release
  dependency-version: 3.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-20 23:08:27 +08:00

76 lines
1.8 KiB
YAML

name: Documentation Site
on:
push:
branches:
- "master-v2"
- "dev-v2"
paths:
- ".github/workflows/website-workflow.yml"
- "docs/**"
pull_request:
paths:
- ".github/workflows/website-workflow.yml"
- "docs/**"
workflow_dispatch:
inputs:
deploy-to-prod:
description: "Deploy to prod"
default: false
required: true
type: boolean
concurrency:
group: "pages"
cancel-in-progress: false
permissions:
# required for peaceiris/actions-gh-pages
contents: write
jobs:
build:
name: Build and Deploy
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout repository
uses: actions/checkout@v7
with:
show-progress: false
- name: Install pnpm
uses: pnpm/action-setup@v5
with:
package_json_file: "./docs/package.json"
run_install: false
- name: Setup node.js environment
uses: actions/setup-node@v6
with:
node-version: 24
cache: pnpm
cache-dependency-path: "./docs/pnpm-lock.yaml"
- name: Install node modules
run: pnpm install --frozen-lockfile
working-directory: "./docs"
- name: Build
run: pnpm run build
working-directory: "./docs"
- name: Upload artifact to GitHub
uses: actions/upload-artifact@v7
with:
name: dist
path: "./docs/.vuepress/dist"
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
if: github.repository_owner == 'MaaAssistantArknights' && (inputs.deploy-to-prod == true || github.ref == 'refs/heads/master-v2')
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: "./docs/.vuepress/dist"
publish_branch: gh-pages