-
Notifications
You must be signed in to change notification settings - Fork 4
65 lines (56 loc) · 1.52 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
name: docs
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
tests:
name: "Build docs"
runs-on: ubuntu-latest
steps:
- name: Clone vplot repo
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: vplot
environment-file: environment.yml
- name: Install vplanet-private pre-release
shell: bash -l {0}
run: |
python -m pip install vplanet
- name: Run vplanet
shell: bash -l {0}
run: |
for f in docs/notebooks/examples/*/vpl.in
do
pushd ${f%/*}
vplanet vpl.in
popd
done
- name: Install vplot
shell: bash -l {0}
run: |
python -m pip install -U pip
python -m pip install -e .
- name: Run notebooks
shell: bash -l {0}
run: |
python .github/workflows/run_notebooks.py
- name: Build the docs
id: build
shell: bash -l {0}
run: |
cd docs
make html
touch _build/html/.nojekyll
- name: Publish the docs
uses: JamesIves/[email protected]
# NOTE: Triggered only when the PR is *merged* (event_name == 'push')
if: steps.build.outcome == 'success' && github.event_name == 'push'
with:
branch: gh-pages
folder: docs/_build/html