Skip to content

Commit

Permalink
Add workflow for building notebooks
Browse files Browse the repository at this point in the history
  • Loading branch information
adjavon committed Jul 25, 2024
1 parent 14d8e72 commit 4232d59
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/build-notebooks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Build Notebooks
on:
push:

jobs:
run:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"

- name: Install dependencies
run: |
python -m pip install -U pip
python -m pip install jupytext nbconvert
- name: Build notebooks
run: |
jupytext --to ipynb --update-metadata '{"jupytext":{"cell_metadata_filter":"all"}}' solution.py
jupyter nbconvert solution.ipynb --TagRemovePreprocessor.enabled=True --TagRemovePreprocessor.remove_cell_tags solution --to notebook --output exercise.ipynb
jupyter nbconvert solution.ipynb --TagRemovePreprocessor.enabled=True --TagRemovePreprocessor.remove_cell_tags task --to notebook --output solution.ipynb
- uses: EndBug/add-and-commit@v9
with:
add: solution.ipynb exercise.ipynb

0 comments on commit 4232d59

Please sign in to comment.