-
Notifications
You must be signed in to change notification settings - Fork 19
45 lines (39 loc) · 1.08 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
41
42
43
44
45
name: Build and Deploy
on:
push:
branches:
- master
pull_request:
branches:
- "*"
permissions:
contents: write
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: Build
run: |
sudo apt-get install graphviz
pip install -r requirements-docs.txt
sphinx-build -j 4 -T -b html docs/source docs/build/html
- name: Deploy 🚀
if: startsWith(github.ref, 'refs/tags/') # only publish stable documentation on tag pushes
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: docs/build/html
BRANCH: gh-pages
target-folder: stable
- name: Deploy 🚀
if: github.ref != 'refs/heads/master'
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: docs/build/html
BRANCH: gh-pages
target-folder: dev