Skip to content

Commit 8ceb2a0

Browse files
slhckclaude
andcommitted
ci: add GitHub Actions workflow for automatic docs deployment
- Deploy to GitHub Pages on push to master when docs/ or mkdocs.yml changes - Run dry-run build on PRs to validate documentation - Use uvx with mkdocs-material to match manual deployment workflow - Configure proper permissions for gh-pages branch writes This eliminates the need to manually run `uvx --with mkdocs-material mkdocs gh-deploy` after documentation changes. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 6cdd1c4 commit 8ceb2a0

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

.github/workflows/deploy-docs.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Deploy Documentation
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
paths:
8+
- 'docs/**'
9+
- 'mkdocs.yml'
10+
pull_request:
11+
paths:
12+
- 'docs/**'
13+
- 'mkdocs.yml'
14+
15+
permissions:
16+
contents: write
17+
18+
jobs:
19+
deploy:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v4
23+
with:
24+
fetch-depth: 0 # Fetch all history for proper git info in docs
25+
26+
- name: Configure Git Credentials
27+
if: github.event_name == 'push'
28+
run: |
29+
git config user.name github-actions[bot]
30+
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
31+
32+
- name: Set up Python
33+
uses: actions/setup-python@v5
34+
with:
35+
python-version: 3.x
36+
37+
- name: Install uv
38+
uses: astral-sh/setup-uv@v4
39+
40+
- name: Build documentation (PR dry run)
41+
if: github.event_name == 'pull_request'
42+
run: uvx --with mkdocs-material mkdocs build
43+
44+
- name: Deploy documentation
45+
if: github.event_name == 'push'
46+
run: uvx --with mkdocs-material mkdocs gh-deploy --force

0 commit comments

Comments
 (0)