File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Build Sphinx Documentation
2+
3+ on :
4+ push :
5+ branches : [ main, update_references]
6+ paths :
7+ - ' docs/**'
8+ - ' .github/workflows/sphinx-docs.yml'
9+ pull_request :
10+ branches : [ main, update_references ]
11+ paths :
12+ - ' docs/**'
13+ - ' .github/workflows/sphinx-docs.yml'
14+ workflow_dispatch :
15+
16+ jobs :
17+ build-docs :
18+ runs-on : ubuntu-latest
19+
20+ steps :
21+ - uses : actions/checkout@v3
22+
23+ - name : Set up Python 3.11
24+ uses : actions/setup-python@v4
25+ with :
26+ python-version : ' 3.11'
27+
28+ - name : Install system dependencies
29+ run : |
30+ sudo apt-get update
31+ sudo apt-get install -y graphviz
32+
33+ - name : Upgrade pip and setuptools
34+ run : |
35+ python -m pip install --upgrade --no-cache-dir pip setuptools
36+
37+ - name : Install Sphinx and dependencies
38+ run : |
39+ python -m pip install --upgrade --no-cache-dir sphinx sphinx-rtd-theme
40+ python -m pip install --upgrade --upgrade-strategy only-if-needed --no-cache-dir .[docs]
41+
42+ - name : Build Sphinx documentation
43+ working-directory : ./docs
44+ run : |
45+ python -m sphinx -T -W --keep-going -b dirhtml -d _build/doctrees -D language=en . _build/html
46+
47+ - name : Upload artifact
48+ uses : actions/upload-artifact@v3
49+ with :
50+ name : sphinx-docs
51+ path : docs/_build/html/
52+ retention-days : 5
You can’t perform that action at this time.
0 commit comments