Skip to content

Pre-process example notebooks #17

Pre-process example notebooks

Pre-process example notebooks #17

name: Pre-process example notebooks
on:
workflow_dispatch:
# TODO: Run when source repo releases are available on Conda Forge
# TODO: Run when the examples Conda environment is changed
jobs:
preprocess:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Conda environment
uses: mamba-org/setup-micromamba@v1
with:
environment-file: devtools/conda-envs/examples_env.yml
- name: Checkout deployment branch
uses: actions/checkout@v3
with:
ref: _cookbook_data
path: 'deploy'
clean: false
- name: Prepare cache deployment directory
shell: bash -l {0}
run: |
cd deploy
git config user.name github-actions
git config user.email github-actions@github.com
git rm -r .
- name: Pre-process and execute notebooks
shell: bash -l {0}
run: |
python source/_ext/proc_examples.py --prefix=deploy
- name: Deploy cache
shell: bash -l {0}
run: |
cd deploy
git add .
git commit -m "Deploy pre-processed notebook cache"
git push origin _cookbook_data