Skip to content

Allow errors on notebooks #28

Allow errors on notebooks

Allow errors on notebooks #28

Workflow file for this run

on:
push:
branches:
- master
workflow_dispatch:
jobs:
nikola_build:
runs-on: ubuntu-latest
container:
image: docker.io/firedrakeproject/firedrake-vanilla:2023-10
options: --user root
name: "Deploy Nikola to GitHub Pages"
steps:
- name: Activate Firedrake virtual environment
run: |
. /home/firedrake/firedrake/bin/activate
echo PATH=$PATH >> $GITHUB_ENV
- name: Checkout icepack source
uses: actions/checkout@v2
with:
repository: icepack/icepack
path: icepack
- name: Install icepack and dependencies
run: |
apt update && apt install -yq patchelf graphviz moreutils jq
pip install git+https://github.com/icepack/Trilinos.git
pip install git+https://github.com/icepack/pyrol.git
pip install jupyter nbconvert netCDF4
pip install "Nikola[extras]"
pip install --editable ./icepack
- name: Create jupyter kernel
run: python -m ipykernel install --user --name=firedrake
- name: Checkout website source
uses: actions/checkout@v2
with:
path: website
- name: Preparing
working-directory: ./website
run: |
src_branch=$(python -c 'import conf; print(conf.GITHUB_SOURCE_BRANCH)')
dest_branch=$(python -c 'import conf; print(conf.GITHUB_DEPLOY_BRANCH)')
git remote add ghpages "https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" || true
git fetch ghpages $dest_branch || true
git checkout -b $dest_branch --track ghpages/$dest_branch || true
git pull ghpages $dest_branch || true
git checkout $src_branch
printf '\n\nGITHUB_REMOTE_NAME = "ghpages"\nGITHUB_COMMIT_SOURCE = False\n' >> conf.py
- name: Execute notebooks
working-directory: ./website
env:
EARTHDATA_USERNAME: ${{ secrets.EARTHDATA_USERNAME }}
EARTHDATA_PASSWORD: ${{ secrets.EARTHDATA_PASSWORD }}
run: make all --jobs $(nproc --all)
- name: Publish
working-directory: ./website
run: |
nikola github_deploy