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