-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (50 loc) · 1.64 KB
/
build_docs.yml
File metadata and controls
53 lines (50 loc) · 1.64 KB
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
47
48
49
50
51
52
53
name: Build Docs
on:
push:
branches:
- dev
pull_request:
branches:
- dev
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true
jobs:
build_docs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
id: setup_python
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Set up Poetry
run: |
pip install poetry
- name: restore cached virtual environment
uses: actions/cache/restore@v4
with:
key: venv-${{ runner.os }}-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('poetry.lock') }}
path: .venv
- name: Install docs dependencies
run: |
python -m venv .venv
source .venv/bin/activate
poetry install --with docs
- name: build docs
run: |
source .venv/bin/activate
which sphinx-build
make build-docs
- name: check links
run: |
source .venv/bin/activate
make check-doc-links
- name: deploy docs
if: github.ref == 'refs/heads/dev'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/_build/html