File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : Docs2Pages
2- on :
3- push :
4- tags : ' *'
5- pull_request :
6- branches :
7- - master
2+ on : [push, pull_request, workflow_dispatch]
3+ permissions :
4+ contents : write
85
96jobs :
107 build-docs :
118 runs-on : ubuntu-latest
129 steps :
1310 - name : Checkout
14- uses : actions/checkout@master
11+ uses : actions/checkout@v3
12+ - uses : actions/setup-python@v5
1513 with :
16- fetch-depth : 0
17- - uses : actions/setup-python@v2
18- with :
19- python-version : 3.9
20- - uses : abatilo/actions-poetry@v2.1.3
21- - name : install
22- run : poetry install -E amazon -E docs
23- - name : Build documentation
14+ python-version : ' 3.12'
15+
16+ - name : Install Poetry
17+ uses : snok/install-poetry@v1
18+
19+ - name : Install dependencies
2420 run : |
25- mkdir gh-pages
26- touch gh-pages/.nojekyll
27- cd docs/
28- poetry run sphinx-build -b html . _build
29- cp -r _build/* ../gh-pages/
21+ poetry install --with dev
22+
23+ - name : Sphinx build
24+ run : |
25+ poetry run sphinx-build -M html docs/source docs/build/html
26+
3027 - name : Deploy documentation
31- if : ${{ github.event_name == 'push' }}
32- uses : JamesIves/ github-pages-deploy-action@4.1.4
28+ uses : peaceiris/actions-gh-pages@v3
29+ if : github.event_name == 'push' && github.ref == 'refs/heads/master'
3330 with :
34- branch : gh-pages
35- folder : gh-pages
31+ publish_branch : gh-pages
32+ github_token : ${{ secrets.GITHUB_TOKEN }}
33+ publish_dir : ./docs/build/html
34+ force_orphan : true
You can’t perform that action at this time.
0 commit comments