Skip to content

Tutorials

Tutorials #354

Workflow file for this run

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@v4
with:
fetch-depth: 0
submodules: true
- name: Set up Python
uses: actions/setup-python@v5
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@v4
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@v4
with:
fetch-depth: 0
submodules: true
- name: Set up Python
uses: actions/setup-python@v5
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@v4
with:
path: ./executed
merge-multiple: true
- 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@v4
with:
name: docs
path: docs/_build/dirhtml
- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4.5.0
if: ${{ github.ref == 'refs/heads/main' }}
with:
branch: gh-pages
folder: docs/_build/dirhtml
single-commit: true
clean: true
clean-exclude: |
.nojekyll
CNAME