-
Notifications
You must be signed in to change notification settings - Fork 186
43 lines (41 loc) · 1.1 KB
/
deploy_sphinx_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
name: Deploy Sphinx documentation to Pages
on:
pull_request:
types: [opened, synchronize]
paths:
- 'docs/sphinx_doc/**/*'
push:
branches:
- main
jobs:
pages:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: [ "3.9", "3.10" ]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@master
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -v -e .[dev]
- id: build
name: Build Documentation
run: |
cd docs/sphinx_doc
bash build_doc.sh
- name: Upload Documentation
uses: actions/upload-artifact@v3
with:
name: SphinxDoc
path: 'docs/sphinx_doc/build/html'
- uses: peaceiris/actions-gh-pages@v3
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: 'docs/sphinx_doc/build/html'