-
Notifications
You must be signed in to change notification settings - Fork 14
106 lines (93 loc) · 2.71 KB
/
tutorials.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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
name: Tutorials
on:
schedule:
- cron: "0 0 * * 1"
push:
branches:
- main
tags:
- "*"
pull_request:
workflow_dispatch:
jobs:
notebooks:
name: Execute ${{ matrix.notebook-name }}
runs-on: ubuntu-latest
strategy:
matrix:
notebook-name:
- docs/tutorials/lc-gp-transit.ipynb
- docs/tutorials/lc-multi.ipynb
- docs/tutorials/joint.ipynb
- docs/tutorials/tess.ipynb
- docs/tutorials/eb.ipynb
- docs/tutorials/quick-tess.ipynb
- docs/tutorials/stellar-variability.ipynb
- docs/tutorials/ttv.ipynb
- docs/tutorials/rv-multi.ipynb
- docs/tutorials/astrometric.ipynb
- docs/tutorials/transit.ipynb
- docs/tutorials/rv.ipynb
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: true
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.9"
- name: Install dependencies
run: |
python -m pip install -U pip wheel
python -m pip install -r requirements-execute.txt
- name: Execute the notebooks
run: |
jupytext --to ipynb --execute $NOTEBOOK_NAME
env:
NOTEBOOK_NAME: ${{ matrix.notebook-name }}
- uses: actions/upload-artifact@v2
with:
name: executed-${{ hashFiles(matrix.notebook-name) }}
path: ${{ matrix.notebook-name }}
combine:
name: Build the docs page
needs: notebooks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: true
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.9"
- name: Install dependencies
run: |
python -m pip install -U pip
python -m pip install -r requirements-docs.txt
- name: Download the executed notebooks
uses: actions/download-artifact@v2
with:
path: ./executed
- name: Move the executed notebooks to their correct locations
run: find executed -name "*.ipynb" -exec cp {} docs/tutorials \;
- name: Build the docs
working-directory: docs
run: make dirhtml
- uses: actions/upload-artifact@v2
with:
name: docs
path: docs/_build/dirhtml
- name: Deploy
uses: JamesIves/[email protected]
if: ${{ github.ref == 'refs/heads/main' }}
with:
branch: gh-pages
folder: docs/_build/dirhtml
single-commit: true
clean: true
clean-exclude: |
.nojekyll
CNAME