Skip to content

Upgrade packages, Jupyterbook 1.0 #786

Upgrade packages, Jupyterbook 1.0

Upgrade packages, Jupyterbook 1.0 #786

Workflow file for this run

name: CI
on:
push:
branches: main
pull_request:
branches: main
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: write
pages: write
id-token: write
# Allow one concurrent deployment
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup JupyterBook Cache
uses: actions/cache@v4
with:
path: _build
# NOTE: change key to "jupyterbook-DATE" to force rebuilding cache
key: jupyterbook-20240221
- name: Install Conda environment with Micromamba
uses: mamba-org/setup-micromamba@v1
with:
environment-file: conda/conda-lock.yml
environment-name: xarray-tutorial
cache-environment: true
- name: Build JupyterBook
# NOTE: login shell activates conda environment
shell: bash -el {0}
run: |
jupyter-book build ./ --warningiserror --keep-going
- name: Dump Build Logs
if: always()
run: |
if (test -a _build/html/reports/*log); then cat _build/html/reports/*log ; fi
- name: Save Build
if: always()
uses: actions/upload-artifact@v4
with:
name: build
path: _build/
- name: Publish to GitHub Pages
if: github.ref == 'refs/heads/main'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: _build/html
publish_branch: gh-pages
cname: tutorial.xarray.dev
enable_jekyll: false