Skip to content

Commit a33645d

Browse files
GiggleLiuclaude
andauthored
Fix GitHub Pages deployment configuration (#34)
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 <noreply@anthropic.com>
1 parent 012dba7 commit a33645d

1 file changed

Lines changed: 23 additions & 2 deletions

File tree

.github/workflows/docs.yml

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,19 @@ on:
77
workflow_dispatch:
88

99
permissions:
10-
contents: write
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
concurrency:
15+
group: "pages"
16+
cancel-in-progress: false
1117

1218
jobs:
1319
deploy:
20+
environment:
21+
name: github-pages
22+
url: ${{ steps.deployment.outputs.page_url }}
1423
runs-on: ubuntu-latest
1524
steps:
1625
- uses: actions/checkout@v4
@@ -24,5 +33,17 @@ jobs:
2433
run: |
2534
pip install mkdocs-material mkdocstrings[python] pymdown-extensions
2635
36+
- name: Build documentation
37+
run: mkdocs build
38+
39+
- name: Setup Pages
40+
uses: actions/configure-pages@v5
41+
42+
- name: Upload artifact
43+
uses: actions/upload-pages-artifact@v3
44+
with:
45+
path: 'site'
46+
2747
- name: Deploy to GitHub Pages
28-
run: mkdocs gh-deploy --force
48+
id: deployment
49+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)