-
Notifications
You must be signed in to change notification settings - Fork 4
40 lines (37 loc) · 1.09 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
name: Build and deploy documentation
on:
push:
branches:
- 'main'
pull_request:
env:
WORKFLOWS_DIR: .github/workflows
jobs:
docs:
name: Build and deploy documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # fetches tags, required for version info
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Build library
run: pip install .
- name: Install documentation dependencies
run: |
sudo apt-get install graphviz pandoc
pip install -r docs/requirements.txt
- name: Build documentation
run: ${{ env.WORKFLOWS_DIR }}/build-docs
- name: Deploy documentation
if: ${{ github.event_name == 'push' && (github.ref_name == 'main' || github.ref_name == 'release') }}
uses: s0/git-publish-subdir-action@develop
env:
REPO: self
BRANCH: docs
FOLDER: docs/_build/html/
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CLEAR_GLOBS_FILE: ${{ env.WORKFLOWS_DIR }}/clear-target-files