diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 2fc29ee7..01c04a8d 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -9,12 +9,10 @@ on: workflow_dispatch: permissions: - contents: read - pages: write - id-token: write + contents: write concurrency: - group: pages + group: gh-pages cancel-in-progress: true jobs: @@ -35,9 +33,6 @@ jobs: python -m pip install --upgrade pip pip install -r docs/en/requirements.txt -r docs/zh/requirements.txt jieba - - name: Configure Pages - uses: actions/configure-pages@v5 - - name: Build multilingual HTML run: | # Build English @@ -52,19 +47,9 @@ jobs: echo '
Redirecting...' > site/index.html touch site/.nojekyll - - name: Upload Pages artifact - uses: actions/upload-pages-artifact@v3 + - name: Deploy to gh-pages branch + uses: peaceiris/actions-gh-pages@v4 with: - path: site - - deploy: - needs: build - runs-on: ubuntu-latest - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - - steps: - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v4 + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_branch: gh-pages + publish_dir: site