Template publishing Julia-kerneled Jupyter notebooks
Jupyter book creates a beautiful website from Markdown and Jupyter notebook files. It is done by my docker-jupyterbook container.
Click Use this template
button to copy this repository.
See also:
- template-quarto-julia: using GitHub actions and dynamic matrix to execute notebooks in parallel and quarto to rendeer the website.
Notebook execution and publish
You will need one of "GitHub actions" and "Cirrus CI".
GitHub actions
- Workflow file: ci.yml
Cirrus CI for notebook execution and publish
Cirrus CI workflow files:
- .cirrus.yml for Cirrus CI pipelines
- cirrus-notify.yml for notification in GitHub in case of execution error
- Dockerfile for runtime environment
You'll need a repo scope GitHub token (click here) encrypted in cirrus CI. Use the encrypted value as GH_TOKEN
variable to push the gh-pages
branch back to GitHub.
Jupyter Book
Jupyter book creates a beautiful website from Markdown and Jupyter notebook files. It is done by my docker-jupyterbook container.
Enable GitHub pages
Open your repository settings => Pages => GitHub Pages
=> Build and deployment => Source, select the gh-pages
branch.
Automatic dependency updates
Renovate bot and Kodiak Bot
This repository uses Renovate Bot to automatically update Julia, Python, and GitHub actions, and Kodiak bot to automate pull requests.
One needs to enable both bots and adds automerge
as an issue label for them to work properly.
Julia dependencies
- update-manifest.yml workflow file
The GitHub acttion will periodically update Julia dependencies and make a PR if the notebooks are executed successfully with the updated packages.
See also the instructions for how to trigger CI workflows in a PR. This repo uses a custom GitHub APP to generate a temporary token.
Checking links in markdown files and notebooks
GitHub actions regularly check if the links ihn the notebooks are valid.
Binder docker images
- binder.yml workflow file
Binder runtime environment files:
- apt.txt (Optional) for apt-installed dependencies.
- requirements.txt for Python dependencies and runtime.txt for Python version.
- Project.toml, Manifest.toml, and the src folder for Julia dependencies.
This GitHub action builds docker images to run notebooks online on mybinder using repo2docker and pushes the resulting container to GitHub container registry (GHCR). The action also generates .binder/Dockerfile that points to the container.