diff --git a/.github/workflows/website-workflow.yml b/.github/workflows/website-workflow.yml index e8e8f65fdd..53f105af85 100644 --- a/.github/workflows/website-workflow.yml +++ b/.github/workflows/website-workflow.yml @@ -24,9 +24,13 @@ concurrency: group: "pages" cancel-in-progress: false +permissions: + # required for peaceiris/actions-gh-pages + contents: write + jobs: build: - name: Build and Deploy Documentation Site + name: Build and Deploy runs-on: ubuntu-latest timeout-minutes: 20 steps: @@ -35,34 +39,31 @@ jobs: with: show-progress: false - - name: Setup Pages - if: github.repository_owner == 'MaaAssistantArknights' - uses: actions/configure-pages@v5 - - name: Install pnpm uses: pnpm/action-setup@v4 with: - version: 10 + package_json_file: "./docs/package.json" run_install: false - - name: Setup Node.js environment + - 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 dependencies + - name: Install node modules run: pnpm install --frozen-lockfile working-directory: "./docs" - - name: Build documentation site + - name: Build run: pnpm run build working-directory: "./docs" - - name: Upload artifact - uses: actions/upload-pages-artifact@v4 + - name: Upload artifact to GitHub + uses: actions/upload-artifact@v4 with: + name: dist path: "./docs/.vuepress/dist" - name: Deploy to GitHub Pages diff --git a/docs/.vuepress/client.ts b/docs/.vuepress/client.ts index 74a04a601b..d1705a88d0 100644 --- a/docs/.vuepress/client.ts +++ b/docs/.vuepress/client.ts @@ -1,6 +1,6 @@ import { defineClientConfig } from 'vuepress/client' -import { getAsciiArt } from './plugins/asciiArt.mts' +import { getAsciiArt } from './plugins/asciiArt' import AsciiArt from './components/AsciiArt.vue' import ImageGrid from './components/ImageGrid.vue' diff --git a/docs/.vuepress/components/AsciiArt.vue b/docs/.vuepress/components/AsciiArt.vue index c539e4d954..7d4fce46ee 100644 --- a/docs/.vuepress/components/AsciiArt.vue +++ b/docs/.vuepress/components/AsciiArt.vue @@ -6,7 +6,7 @@