From 09aaae488eee9f45f9939cc62bbfec821c87bd41 Mon Sep 17 00:00:00 2001 From: GiggleLiu Date: Tue, 20 Jan 2026 17:02:35 +0800 Subject: [PATCH] Fix GitHub Pages deployment configuration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit fixes the 404 error on the documentation site by updating the deployment workflow to use the modern GitHub Pages deployment actions. Changes: - Switched from `mkdocs gh-deploy` to building and deploying via GitHub Actions - Added proper permissions for pages deployment (pages: write, id-token: write) - Added github-pages environment configuration - Using actions/configure-pages, actions/upload-pages-artifact, and actions/deploy-pages for deployment This approach is the recommended way to deploy to GitHub Pages with GitHub Actions. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 --- .github/workflows/docs.yml | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 2c367f6..ebf5c52 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -7,10 +7,19 @@ on: workflow_dispatch: permissions: - contents: write + contents: read + pages: write + id-token: write + +concurrency: + group: "pages" + cancel-in-progress: false jobs: deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -24,5 +33,17 @@ jobs: run: | pip install mkdocs-material mkdocstrings[python] pymdown-extensions + - name: Build documentation + run: mkdocs build + + - name: Setup Pages + uses: actions/configure-pages@v5 + + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: 'site' + - name: Deploy to GitHub Pages - run: mkdocs gh-deploy --force + id: deployment + uses: actions/deploy-pages@v4