-
Notifications
You must be signed in to change notification settings - Fork 30
46 lines (43 loc) · 1.13 KB
/
doc_dev.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_dev
on:
workflow_run:
workflows: ["documentation_stable"]
types:
- completed
permissions:
contents: write
jobs:
docs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: main
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: |
pip install -r main/docs/requirements.txt
pip install -r main/requirements.txt
- name: Sphinx build
run: |
sphinx-build main/docs _build
- uses: actions/checkout@v4
with:
# This is necessary so that we have the tags.
fetch-depth: 0
ref: gh-pages
path: gh_pages
- name: Commit documentation changes
run: |
cd gh_pages
rm -r dev || echo "Ignoring exit status"
mkdir dev
cp -rv ../_build/* dev
git config user.name github-actions
git config user.email github-actions@github.com
git add .
git commit -m "Preview documentation"
git push