-
Notifications
You must be signed in to change notification settings - Fork 11
48 lines (46 loc) · 1.31 KB
/
gh_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
name: gh-pages docs
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Install doc deps
run: |
pip install .'[docs]'
- name: Install Pandoc dependency
run: |
sudo apt-get install pandoc
- name: Set up node
uses: actions/setup-node@v2
- name: Install mermaid.js dependency
run: |
npm install @mermaid-js/mermaid-cli
- 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: Download large files
run: |
python3 docs/download_external_files.py
- name: Build the docs
run: |
make -C docs clean
make -C docs html MERMAID_PATH="../node_modules/.bin/"
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/_build/html