Skip to content

Commit b73e602

Browse files
committed
On PRs (ci.yml):
- Tests (Python 3.10-3.13) with lint, format, tests - Docs build check - CI Success gate (requires both to pass) On release (docs.yml): - Builds and deploys docs to GitHub Pages
1 parent 3739f28 commit b73e602

File tree

2 files changed

+34
-1
lines changed

2 files changed

+34
-1
lines changed

.github/workflows/ci.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,35 @@ jobs:
4040
with:
4141
token: ${{ secrets.CODECOV_TOKEN }}
4242
fail_ci_if_error: false
43+
44+
docs:
45+
runs-on: ubuntu-latest
46+
steps:
47+
- uses: actions/checkout@v6
48+
49+
- name: Install uv
50+
uses: astral-sh/setup-uv@v7
51+
52+
- name: Install dependencies
53+
run: uv sync --extra docs
54+
55+
- name: Build docs
56+
run: uv run mkdocs build
57+
58+
ci-success:
59+
name: CI Success
60+
needs: [test, docs]
61+
if: always()
62+
runs-on: ubuntu-latest
63+
steps:
64+
- name: Check all jobs passed
65+
run: |
66+
if [[ "${{ needs.test.result }}" != "success" ]]; then
67+
echo "Test job failed or was cancelled"
68+
exit 1
69+
fi
70+
if [[ "${{ needs.docs.result }}" != "success" ]]; then
71+
echo "Docs job failed or was cancelled"
72+
exit 1
73+
fi
74+
echo "All CI checks passed!"

.github/workflows/docs.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Docs
22

33
on:
4-
push:
4+
pull_request:
55
branches: [main]
66
release:
77
types: [published]
@@ -26,6 +26,7 @@ jobs:
2626
run: uv run mkdocs build
2727

2828
- name: Deploy to GitHub Pages
29+
if: github.event_name == 'release'
2930
uses: peaceiris/actions-gh-pages@v4
3031
with:
3132
github_token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)