-
Notifications
You must be signed in to change notification settings - Fork 9
54 lines (51 loc) · 1.41 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
47
48
49
50
51
52
53
54
name: Documentation generation & update
on:
push:
tags:
- '*'
branches:
- develop
- master
pull_request:
branches:
- develop
- master
jobs:
generate:
name: Generate the documentation
runs-on: ubuntu-latest
steps:
- name: Clone
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install APT dependencies
run: |
sudo apt-get update
sudo apt-get install graphviz
- name: Install Python dependencies
run: |
pip install -U pip
pip install .[doc]
- name: Generating automatic resources
run: (cd doc && make gen_resources)
- name: Generate the documentation
run: (cd doc && make html)
- name: Upload documentation bundle
uses: actions/upload-artifact@v4
with:
name: documentation
path: doc/build/html/
deploy:
name: Deploy the documentation on Github pages
runs-on: ubuntu-latest
needs: generate
if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/'))
steps:
- name: Download documentation bundle
uses: actions/download-artifact@v4
- name: Deploy documentation on pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: documentation/