forked from ESCOMP/CTSM
-
Notifications
You must be signed in to change notification settings - Fork 1
80 lines (74 loc) · 2.04 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: docs
on:
push:
branches:
- master
- b4b-dev
paths:
- 'doc/**'
pull_request:
branches:
- master
- b4b-dev
paths:
- 'doc/**'
workflow_dispatch:
permissions:
contents: read
jobs:
test-build-makefile:
if: ${{ always() }}
name: Test building documentation with makefile
runs-on: ubuntu-latest
steps:
- uses: actions/checkout
with:
fetch-depth: 0
lfs: true
- name: Install python 3.x
uses: actions/setup-python
with:
python-version: '3.x'
# https://github.com/actions/cache/blob/main/examples.md#python---pip
- name: Cache pip
uses: actions/cache
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('doc/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
pip install -r doc/requirements.txt
# Build documentation under ${PWD}/_build
- name: Build Sphinx docs with makefile
run: |
make SPHINXOPTS="-W --keep-going" BUILDDIR=${PWD}/_build -C doc/ html
test-doc-builder:
if: ${{ always() }}
name: Test building documentation with doc-builder
runs-on: ubuntu-latest
steps:
- uses: actions/checkout
with:
fetch-depth: 0
lfs: true
- name: Install python 3.x
uses: actions/setup-python
with:
python-version: '3.x'
# https://github.com/actions/cache/blob/main/examples.md#python---pip
- name: Cache pip
uses: actions/cache
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('doc/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
pip install -r doc/requirements.txt
# Build documentation under ${PWD}/_build
- name: Build Sphinx docs with doc-builder
run: |
cd doc && ./build_docs -b ${PWD}/_build -c