-
Notifications
You must be signed in to change notification settings - Fork 2
42 lines (39 loc) · 1.24 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
name: Build and Deploy docs
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
release:
types:
- created
jobs:
docs:
name: build and deploy docs
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set system to non-interactive mode
run: export DEBIAN_FRONTEND=noninteractive
- name: install dependencies
run: |
pip install sphinx
pip install sphinx-rtd-theme
pip install sphinx-multiversion
pip install sphinx-copybutton
- name: build docs
run: |
echo "Repo = ${GITHUB_REPOSITORY}"
cd doc/sphinx
# throw warnings as error to make sure docs properly build
make multiversion SPHINXOPTS="-W --keep-going -n"
- name: Deploy
if: ${{ (github.event.pull_request.head.repo.full_name == github.repository) || (github.ref == 'refs/heads/main') }}
uses: peaceiris/actions-gh-pages@v3.7.3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./doc/sphinx/_build/html
force_orphan: true