1
- name : Documentation
1
+ name : Deploy Documentation
2
2
3
3
on :
4
4
push :
5
- branches : [ main ]
6
- pull_request :
7
- types : [opened, synchronize, reopened]
8
- branches : [ main ]
9
- workflow_dispatch :
5
+ branches :
6
+ - main # or your default branch
7
+ workflow_dispatch : # Allows manual triggering
10
8
9
+ # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
11
10
permissions :
12
11
contents : read
13
12
pages : write
14
13
id-token : write
15
14
15
+ # Allow only one concurrent deployment
16
16
concurrency :
17
17
group : " pages"
18
18
cancel-in-progress : false
@@ -21,42 +21,38 @@ jobs:
21
21
build :
22
22
runs-on : ubuntu-latest
23
23
steps :
24
- - uses : actions/checkout@v4
24
+ - name : Checkout repository
25
+ uses : actions/checkout@v4
25
26
26
27
- name : Set up Python
27
- uses : actions/setup-python@v4
28
+ uses : actions/setup-python@v5
28
29
with :
29
- python-version : ' 3.10'
30
+ python-version : ' 3.10' # or your preferred version
30
31
cache : ' pip'
31
32
32
33
- name : Install dependencies
33
34
run : |
34
35
python -m pip install --upgrade pip
35
- pip install -e .
36
- pip install sphinx sphinx-rtd-theme sphinx-copybutton sphinx-design myst-parser
36
+ pip install poetry
37
+ poetry install
37
38
38
39
- name : Build documentation
39
- working-directory : docs
40
40
run : |
41
- # Don't treat warnings as errors
42
- SPHINXOPTS="-n" make html
43
-
44
- - name : Setup Pages
45
- uses : actions/configure-pages@v4
41
+ cd docs
42
+ poetry run make html
46
43
47
44
- name : Upload artifact
48
45
uses : actions/upload-pages-artifact@v3
49
46
with :
50
47
path : docs/_build/html
51
48
52
49
deploy :
53
- needs : build
54
- if : github.ref == 'refs/heads/main'
55
- runs-on : ubuntu-latest
56
50
environment :
57
51
name : github-pages
58
52
url : ${{ steps.deployment.outputs.page_url }}
53
+ needs : build
54
+ runs-on : ubuntu-latest
59
55
steps :
60
56
- name : Deploy to GitHub Pages
61
57
id : deployment
62
- uses : actions/deploy-pages@v3
58
+ uses : actions/deploy-pages@v4
0 commit comments