Skip to content

Commit 416779b

Browse files
committed
ci(docs): trigger docs rebuild on src/ and scripts/ changes
- src/** changes may affect design docs (symlinked) and verification.rst - scripts/** changes affect verification generation
1 parent fc6e249 commit 416779b

1 file changed

Lines changed: 58 additions & 54 deletions

File tree

.github/workflows/docs.yml

Lines changed: 58 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,75 @@
11
name: Documentation
22

33
on:
4-
push:
5-
branches: [main]
6-
paths:
7-
- "docs/**"
8-
- ".github/workflows/docs.yml"
9-
pull_request:
10-
branches: [main]
11-
paths:
12-
- "docs/**"
13-
- ".github/workflows/docs.yml"
14-
workflow_dispatch:
4+
push:
5+
branches: [main]
6+
paths:
7+
- "docs/**"
8+
- "src/**"
9+
- "scripts/**"
10+
- ".github/workflows/docs.yml"
11+
pull_request:
12+
branches: [main]
13+
paths:
14+
- "docs/**"
15+
- "src/**"
16+
- "scripts/**"
17+
- ".github/workflows/docs.yml"
18+
workflow_dispatch:
1519

1620
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
1721
permissions:
18-
contents: read
19-
pages: write
20-
id-token: write
22+
contents: read
23+
pages: write
24+
id-token: write
2125

2226
concurrency:
23-
group: "pages"
24-
cancel-in-progress: false
27+
group: "pages"
28+
cancel-in-progress: false
2529

2630
jobs:
27-
build-docs:
28-
runs-on: ubuntu-24.04
29-
steps:
30-
- name: Checkout repository
31-
uses: actions/checkout@v4
31+
build-docs:
32+
runs-on: ubuntu-24.04
33+
steps:
34+
- name: Checkout repository
35+
uses: actions/checkout@v4
3236

33-
- name: Set up Python
34-
uses: actions/setup-python@v5
35-
with:
36-
python-version: "3.12"
37-
cache: "pip"
37+
- name: Set up Python
38+
uses: actions/setup-python@v5
39+
with:
40+
python-version: "3.12"
41+
cache: "pip"
3842

39-
- name: Install dependencies
40-
run: |
41-
sudo apt-get update
42-
sudo apt-get install -y graphviz plantuml
43-
pip install -e docs/.[dev]
43+
- name: Install dependencies
44+
run: |
45+
sudo apt-get update
46+
sudo apt-get install -y graphviz plantuml
47+
pip install -e docs/.[dev]
4448
45-
- name: Generate verification report
46-
run: python3 scripts/generate_verification.py
49+
- name: Generate verification report
50+
run: python3 scripts/generate_verification.py
4751

48-
- name: Check links
49-
working-directory: docs
50-
run: sphinx-build -b linkcheck . _build/linkcheck
52+
- name: Check links
53+
working-directory: docs
54+
run: sphinx-build -b linkcheck . _build/linkcheck
5155

52-
- name: Build documentation
53-
working-directory: docs
54-
run: sphinx-build -b html . _build/html -W --keep-going
56+
- name: Build documentation
57+
working-directory: docs
58+
run: sphinx-build -b html . _build/html -W --keep-going
5559

56-
- name: Upload artifact
57-
uses: actions/upload-pages-artifact@v3
58-
with:
59-
path: docs/_build/html
60+
- name: Upload artifact
61+
uses: actions/upload-pages-artifact@v3
62+
with:
63+
path: docs/_build/html
6064

61-
deploy-docs:
62-
environment:
63-
name: github-pages
64-
url: ${{ steps.deployment.outputs.page_url }}
65-
runs-on: ubuntu-24.04
66-
needs: build-docs
67-
if: github.ref == 'refs/heads/main'
68-
steps:
69-
- name: Deploy to GitHub Pages
70-
id: deployment
71-
uses: actions/deploy-pages@v4
65+
deploy-docs:
66+
environment:
67+
name: github-pages
68+
url: ${{ steps.deployment.outputs.page_url }}
69+
runs-on: ubuntu-24.04
70+
needs: build-docs
71+
if: github.ref == 'refs/heads/main'
72+
steps:
73+
- name: Deploy to GitHub Pages
74+
id: deployment
75+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)