Skip to content

Commit 42371f1

Browse files
committed
feat(ci): merge docs build and GitHub Pages deployment into ci.yml with conditional deploy
1 parent ec45966 commit 42371f1

File tree

4 files changed

+57
-131
lines changed

4 files changed

+57
-131
lines changed

.clinerules/workflows/scaffolding-guide.md

Lines changed: 0 additions & 131 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,3 +131,42 @@ jobs:
131131
path: |
132132
bandit-report.json
133133
safety-report.json
134+
135+
docs:
136+
name: Build Documentation
137+
runs-on: ubuntu-latest
138+
needs: test
139+
permissions:
140+
contents: write # Needed for GitHub Pages deployment
141+
142+
steps:
143+
- name: Checkout
144+
uses: actions/checkout@v4
145+
146+
- name: Install uv
147+
uses: astral-sh/setup-uv@v4
148+
with:
149+
enable-cache: true
150+
151+
- name: Set up Python
152+
run: uv python install 3.11
153+
154+
- name: Sync dependencies (includes sphinx)
155+
run: uv sync --all-extras --dev
156+
157+
- name: Build documentation
158+
run: uv run sphinx-build -b html docs docs/_build/html
159+
160+
- name: Upload documentation artifacts
161+
uses: actions/upload-artifact@v4
162+
with:
163+
name: documentation
164+
path: docs/_build/html
165+
166+
- name: Deploy to GitHub Pages
167+
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
168+
uses: peaceiris/actions-gh-pages@v3
169+
with:
170+
github_token: ${{ secrets.GITHUB_TOKEN }}
171+
publish_dir: ./docs/_build/html
172+
keep_files: false

pyproject.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,3 +81,9 @@ python_version = "3.13"
8181
warn_return_any = true
8282
warn_unused_configs = true
8383
disallow_untyped_defs = true
84+
85+
[dependency-groups]
86+
dev = [
87+
"sphinx>=8.2.3",
88+
"sphinx-rtd-theme>=3.0.2",
89+
]

uv.lock

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)