File tree Expand file tree Collapse file tree 1 file changed +22
-19
lines changed Expand file tree Collapse file tree 1 file changed +22
-19
lines changed Original file line number Diff line number Diff line change 1
- name : " Sphinx: Render docs "
1
+ name : documentation
2
2
3
- on : push
3
+ on : [push, pull_request, workflow_dispatch]
4
+
5
+ permissions :
6
+ contents : write
4
7
5
8
jobs :
6
- build :
9
+ docs :
7
10
runs-on : ubuntu-latest
8
- permissions :
9
- contents : write
10
11
steps :
11
- - uses : actions/checkout@v4
12
- - name : Build HTML
13
- uses : ammaraskar/sphinx-action@master
14
- - name : Upload artifacts
15
- uses : actions/upload-artifact@v4
16
- with :
17
- name : html-docs
18
- path : docs/build/html/
19
- - name : Deploy
20
- uses : peaceiris/actions-gh-pages@v3
21
- if : github.ref == 'refs/heads/main'
22
- with :
23
- github_token : ${{ secrets.GITHUB_TOKEN }}
24
- publish_dir : docs/build/html
12
+ - uses : actions/checkout@v4
13
+ - uses : actions/setup-python@v5
14
+ - name : Install dependencies
15
+ run : |
16
+ pip install sphinx
17
+ - name : Sphinx build
18
+ run : |
19
+ sphinx-build doc _build
20
+ - name : Deploy to GitHub Pages
21
+ uses : peaceiris/actions-gh-pages@v3
22
+ if : ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
23
+ with :
24
+ publish_branch : gh-pages
25
+ github_token : ${{ secrets.GITHUB_TOKEN }}
26
+ publish_dir : _build/
27
+ force_orphan : true
You can’t perform that action at this time.
0 commit comments