-
Notifications
You must be signed in to change notification settings - Fork 2
46 lines (41 loc) · 1.16 KB
/
documentation.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
41
42
43
44
45
46
---
name: documentation
on: [push, pull_request]
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
# Ubuntu 20.04 has Python 3.9
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: "3.9"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements_github.txt
python -m pip install sphinx sphinx-autodoc-typehints
- name: Run Sphinx build
run: make doc
- name: Upload doc artifacts
uses: actions/upload-pages-artifact@v3
with:
path: ./doc/build/html
deploy:
# Only deploy on 'master' branch. It's probably still useful to check
# if the docs actually build on other branches, too.
if: github.ref == 'refs/heads/actions_test'
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4