-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (37 loc) · 1.03 KB
/
docs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Documentation
on:
push:
branches:
- main
pull_request:
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v3
- name: Cache tox
uses: actions/cache@v3
with:
path: .tox
key: tox-${{hashFiles('pyproject.toml')}}
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
cache: "pip"
cache-dependency-path: "pyproject.toml"
- name: Install tox
run: python -m pip install tox
- name: Build HTML documentation with tox
run: tox -e docs
- name: Pubish documentation on GitHub pages
if: success() && github.event_name != 'pull_request'
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: docs/_build/html
branch: gh-pages
git-config-name: "github-actions[bot]"
git-config-email: "github-actions[bot]@users.noreply.github.com"