-
Notifications
You must be signed in to change notification settings - Fork 11
57 lines (54 loc) · 1.7 KB
/
docs_build.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
name: docs test
# Run this workflow when a review is requested on a PR that targets the main
# branch, or the PR is closed
on:
pull_request:
types: [review_requested, closed]
pull_request_review:
types: [submitted, dismissed]
# Prevent multiple PRs from building/deploying the docs at the same time
concurrency:
group: ${{ github.workflow }}
# test that the docs build
# (but don't deploy to gh-pages)
jobs:
build_docs:
runs-on: ubuntu-20.04
strategy:
max-parallel: 4
matrix:
python-version: ["3.8"]
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
# cache the Python environment, including installed dependencies
# (speeds up tests more than caching pip cache)
- name: Cache/Restore the Python env
uses: actions/cache@v3
env:
cache-name: cache-python${{ matrix.python-version }}-env
with:
path: ${{ env.pythonLocation }}
key: ${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}
- name: Install doc dependencies
run: |
pip install .[docs]
- name: Install Pandoc dependency
run: |
sudo apt-get install pandoc
- name: Cache/Restore the .mpol folder cache
uses: actions/cache@v3
env:
cache-name: cache-mpol-dls
with:
# files are stored in .mpol
path: ~/.mpol
# the "key" is the hash of the download script
key: ${{ hashFiles('docs/download_external_files.py') }}
- name: Build the docs
run: |
make -C docs clean
make -C docs html