-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
40 lines (37 loc) · 1022 Bytes
/
Copy pathaction.yml
File metadata and controls
40 lines (37 loc) · 1022 Bytes
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 Documentation"
description: "Build Sphinx documentation"
inputs:
python-version:
description: "Python version to use"
required: false
default: "3.10"
treat-warnings-as-errors:
description: "Treat warnings as errors (-W flag)"
required: false
default: "false"
runs:
using: "composite"
steps:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}
- name: Install pandoc
shell: bash
run: |
sudo apt-get update
sudo apt-get install -y pandoc
- name: Install Python dependencies
shell: bash
run: |
python -m pip install --upgrade pip
pip install ".[docs]"
- name: Build Sphinx docs
shell: bash
run: |
cd docs
if [ "${{ inputs.treat-warnings-as-errors }}" = "true" ]; then
sphinx-build -b html -W --keep-going source build/html
else
sphinx-build -b html source build/html
fi