Skip to content

Commit 3c9fe08

Browse files
ci: add docs build as parallel CI job [PYSDK-110] (#600)
* ci: add docs build as parallel CI job [PYSDK-110] Add _docs.yml reusable workflow running `make docs` on ubuntu-latest and wire it into ci-cd.yml in parallel with lint/audit/test so the documentation build is verified on every PR, not only at publish time. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * docs(ci): document _docs.yml reusable workflow in .github/CLAUDE.md [PYSDK-110] Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent f75eb61 commit 3c9fe08

3 files changed

Lines changed: 53 additions & 1 deletion

File tree

.github/CLAUDE.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ The Aignostics Python SDK uses a **sophisticated multi-stage CI/CD pipeline** bu
9090
| Workflow | Purpose | Duration | Key Outputs |
9191
|----------|---------|----------|-------------|
9292
| **_lint.yml** | Code quality (ruff, pyright, mypy) | ~5 min | Formatted code, type safety |
93+
| **_docs.yml** | Documentation build (Sphinx) | ~3 min | HTML docs, validation |
9394
| **_audit.yml** | Security + license compliance | ~3 min | SBOM (CycloneDX, SPDX), vulnerabilities, licenses |
9495
| **_test.yml** | Multi-stage test execution | ~15 min | Coverage reports, JUnit XML |
9596
| **_codeql.yml** | Security vulnerability scanning | ~10 min | CodeQL SARIF results |
@@ -1099,6 +1100,7 @@ make dist_native
10991100
| `audit-scheduled.yml` | Entry | Security audit | ~5 min |
11001101
| `codeql-scheduled.yml` | Entry | CodeQL scan | ~10 min |
11011102
| `_lint.yml` | Reusable | Code quality checks | ~5 min |
1103+
| `_docs.yml` | Reusable | Documentation build | ~3 min |
11021104
| `_audit.yml` | Reusable | Security & license | ~3 min |
11031105
| `_test.yml` | Reusable | Test execution | ~15 min |
11041106
| `_codeql.yml` | Reusable | Security scanning | ~10 min |

.github/workflows/_docs.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: "> Docs"
2+
3+
on:
4+
workflow_call:
5+
# No secrets needed
6+
7+
jobs:
8+
docs:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: read
12+
id-token: write
13+
packages: read
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
17+
with:
18+
fetch-depth: 0
19+
20+
- name: Install uv
21+
uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
22+
with:
23+
version-file: "pyproject.toml"
24+
enable-cache: true
25+
cache-dependency-glob: uv.lock
26+
27+
- name: Install dev tools
28+
shell: bash
29+
run: .github/workflows/_install_dev_tools.bash
30+
31+
- name: Install Python, venv and dependencies
32+
shell: bash
33+
run: uv sync --all-extras --frozen --link-mode=copy
34+
35+
- name: Docs
36+
shell: bash
37+
run: make docs

.github/workflows/ci-cd.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,19 @@ jobs:
7777
id-token: write
7878
packages: read
7979

80+
docs:
81+
needs: [get-commit-message]
82+
if: |
83+
(!contains(needs.get-commit-message.outputs.commit_message, 'skip:ci')) &&
84+
(!contains(needs.get-commit-message.outputs.commit_message, 'build:native:only')) &&
85+
(!contains(github.event.pull_request.labels.*.name, 'skip:ci')) &&
86+
(!contains(github.event.pull_request.labels.*.name, 'build:native:only'))
87+
uses: ./.github/workflows/_docs.yml
88+
permissions:
89+
contents: read
90+
id-token: write
91+
packages: read
92+
8093
audit:
8194
needs: [get-commit-message]
8295
if: |
@@ -156,7 +169,7 @@ jobs:
156169
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
157170

158171
ketryx_report_and_check:
159-
needs: [get-commit-message, lint, audit, test, codeql, sonarcloud]
172+
needs: [get-commit-message, lint, audit, test, codeql, sonarcloud, docs]
160173
if: |
161174
github.actor != 'dependabot[bot]' &&
162175
(!contains(needs.get-commit-message.outputs.commit_message, 'skip:ci')) &&

0 commit comments

Comments
 (0)