Skip to content

Commit 51e0517

Browse files
committed
ci: readthedocs workflow
1 parent e1fc761 commit 51e0517

1 file changed

Lines changed: 53 additions & 0 deletions

File tree

.github/workflows/docs.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Build Documentation
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- release-*
8+
- v*
9+
pull_request:
10+
branches:
11+
- master
12+
13+
jobs:
14+
build-docs:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v4
20+
with:
21+
fetch-depth: 0
22+
23+
- name: Set up Python
24+
uses: actions/setup-python@v5
25+
with:
26+
python-version: '3.11'
27+
28+
- name: Install dependencies
29+
run: |
30+
python -m pip install --upgrade pip
31+
pip install -r docs/requirements.txt
32+
33+
- name: Build documentation
34+
run: |
35+
cd docs
36+
make html
37+
38+
- name: Check for build errors
39+
run: |
40+
if [ -d docs/_build/html ]; then
41+
echo "Documentation built successfully"
42+
ls -la docs/_build/html
43+
else
44+
echo "Documentation build failed"
45+
exit 1
46+
fi
47+
48+
- name: Upload documentation artifacts
49+
uses: actions/upload-artifact@v4
50+
with:
51+
name: documentation-html
52+
path: docs/_build/html/
53+
retention-days: 30

0 commit comments

Comments
 (0)