-
Notifications
You must be signed in to change notification settings - Fork 8
44 lines (43 loc) · 1.29 KB
/
test_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
42
43
44
name: Test sphinx docs build
env:
CLONE_PATH: ${{ github.workspace }}
HTML_DOCS: ${{ github.workspace }}/docs/build_html
PDF_DOCS: ${{ github.workspace }}/docs/build_pdf
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.12"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install texlive-fonts-recommended texlive-latex-recommended texlive-latex-extra latexmk
sudo apt-get -y install pandoc
- name: Setup base Python environment
run: |
$CLONE_PATH/.github/workflows/setup_base_python.sh ${{ runner.os }}
- name: Build Sphinx documentation
run: |
pushd $CLONE_PATH
tox -r -e html,pdf
popd
- name: Archive Sphinx-based documentation
uses: actions/upload-artifact@v4
with:
name: documentation
path: |
${{ env.HTML_DOCS }}
${{ env.PDF_DOCS }}