forked from iterorganization/SimDB
-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (42 loc) · 1.24 KB
/
build_docs.yml
File metadata and controls
50 lines (42 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Build Docs
on:
push:
pull_request:
types: [opened, synchronize, reopened]
paths:
- "docs/**"
- "src/simdb/**"
jobs:
build-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
cache: pip
- name: Install dependencies
run: |
pip install --upgrade pip setuptools wheel
pip install .[build-docs]
- name: Build Documentation
run: |
cd docs
sphinx-apidoc -f -o sphinx -e -M ../src/simdb
rm -f sphinx/modules.rst || true
cp -f *.md sphinx/ 2>/dev/null || true
cp -f *.svg sphinx/ 2>/dev/null || true
make clean html
- name: Upload docs artifact
uses: actions/upload-artifact@v4
with:
name: documentation
path: docs/_build/html
- name: Check build warnings
run: |
if grep -q "WARNING\|ERROR" docs/_build/html/.doctrees/environment.pickle 2>/dev/null; then
echo "Documentation build has warnings/errors"
exit 1
fi