-
Notifications
You must be signed in to change notification settings - Fork 2
47 lines (40 loc) · 1.09 KB
/
build-docs.yml
File metadata and controls
47 lines (40 loc) · 1.09 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
name: Build Documentation
on:
push:
branches:
- main
paths:
- 'docs/**'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Cache Python packages
uses: actions/cache@v4.0.2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r docs/requirements.txt
- name: Build Documentation with Sphinx
run: |
sphinx-build -M html docs/source/ docs/build/
env:
READTHEDOCS: 'True'
# Uncomment below to upload artifacts if needed
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: Documentation
path: docs/_build/html/