-
Notifications
You must be signed in to change notification settings - Fork 11
41 lines (39 loc) · 1.03 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
name: docs
on:
push:
branches: [main]
paths:
- 'doc/**'
- '.github/workflows/docs.yml'
pull_request:
branches: [main]
paths:
- 'doc/**'
- '.github/workflows/docs.yml'
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Dependencies
run: |
python -m pip install --upgrade pip
pip install sphinx sphinx_rtd_theme
- name: Build
working-directory: ${{github.workspace}}/doc
run: |
make html
touch ${{github.workspace}}/doc/build/html/.nojekyll
- name: Deploy
# Only deploy on push to master
if: github.event_name == 'push'
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
BRANCH: gh-pages
FOLDER: ${{github.workspace}}/doc/build/html
SINGLE_COMMIT: true