| 1 |
name: Docs |
| 2 |
on: |
| 3 |
workflow_dispatch: |
| 4 |
pull_request: |
| 5 |
push: |
| 6 |
branches: |
| 7 |
- master |
| 8 |
|
| 9 |
jobs: |
| 10 |
build: |
| 11 |
runs-on: ubuntu-20.04 |
| 12 |
|
| 13 |
steps: |
| 14 |
- uses: actions/checkout@v3 |
| 15 |
with: |
| 16 |
fetch-depth: 0 |
| 17 |
|
| 18 |
- uses: actions/setup-python@v4 |
| 19 |
with: |
| 20 |
python-version: '3.10' |
| 21 |
|
| 22 |
- name: Add python requirements |
| 23 |
run: | |
| 24 |
python -m pip install --upgrade pip |
| 25 |
pip install tox |
| 26 |
|
| 27 |
- name: Build docs |
| 28 |
run: | |
| 29 |
#tox -e docs-lint |
| 30 |
tox -e docs |
| 31 |
|
| 32 |
- uses: actions/upload-artifact@v4 |
| 33 |
with: |
| 34 |
name: ApiDocsHTML |
| 35 |
path: "docs/_build/html/" |
| 36 |
|
| 37 |
- name: set nojekyll for github |
| 38 |
run: | |
| 39 |
sudo touch docs/_build/html/.nojekyll |
| 40 |
|
| 41 |
- name: Deploy docs to gh-pages |
| 42 |
if: ${{ github.event_name == 'push' }} |
| 43 |
uses: JamesIves/[email protected] |
| 44 |
with: |
| 45 |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 46 |
BRANCH: gh-pages |
| 47 |
FOLDER: docs/_build/html/ |
| 48 |
SINGLE_COMMIT: true |