File tree Expand file tree Collapse file tree 2 files changed +92
-0
lines changed
Expand file tree Collapse file tree 2 files changed +92
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Docs Deploy
2+
3+ on :
4+ push :
5+ branches : [ main ]
6+ workflow_dispatch :
7+
8+ permissions :
9+ contents : read
10+ pages : write
11+ id-token : write
12+
13+ concurrency :
14+ group : " pages"
15+ cancel-in-progress : true
16+
17+ jobs :
18+ build-and-deploy :
19+ runs-on : ubuntu-latest
20+ environment :
21+ name : github-pages
22+ url : ${{ steps.deployment.outputs.page_url }}
23+ steps :
24+ - uses : actions/checkout@v4
25+
26+ - uses : actions/setup-python@v5
27+ with :
28+ python-version : " 3.12"
29+ cache : " pip"
30+
31+ - name : Install Poetry
32+ run : pip install poetry
33+
34+ - name : Install dependencies (with docs)
35+ run : poetry install --with docs
36+
37+ - name : Generate API + copy notebooks
38+ run : poetry run python docs/source/generate_api.py
39+
40+ - name : Build docs (Sphinx)
41+ run : |
42+ poetry run sphinx-build -E -a -b html docs/source docs/build/html
43+ touch docs/build/html/.nojekyll
44+
45+ - name : Upload Pages artifact
46+ uses : actions/upload-pages-artifact@v3
47+ with :
48+ path : docs/build/html
49+
50+ - id : deployment
51+ name : Deploy to GitHub Pages
52+ uses : actions/deploy-pages@v4
Original file line number Diff line number Diff line change 1+ name : Docs Preview
2+
3+ on :
4+ pull_request :
5+ branches : [ main ]
6+
7+ permissions :
8+ contents : read
9+
10+ jobs :
11+ build-preview :
12+ runs-on : ubuntu-latest
13+ steps :
14+ - uses : actions/checkout@v4
15+
16+ - uses : actions/setup-python@v5
17+ with :
18+ python-version : " 3.12"
19+ cache : " pip"
20+
21+ - name : Install Poetry
22+ run : pip install poetry
23+
24+ - name : Install dependencies (with docs)
25+ run : poetry install --with docs
26+
27+ - name : Generate API + copy notebooks
28+ run : poetry run python docs/source/generate_api.py
29+
30+ - name : Build docs (Sphinx)
31+ run : |
32+ poetry run sphinx-build -E -a -b html docs/source docs/build/html
33+ touch docs/build/html/.nojekyll
34+
35+ - name : Upload docs preview artifact
36+ uses : actions/upload-artifact@v4
37+ with :
38+ name : docs-html-preview
39+ path : docs/build/html
40+ retention-days : 7
You can’t perform that action at this time.
0 commit comments