Skip to content

feat(jupyterbook): initial #1

feat(jupyterbook): initial

feat(jupyterbook): initial #1

Workflow file for this run

name: Build & deploy Jupyter Book
on:
push:
branches: [main]
workflow_dispatch:
env:
BASE_URL: /${{ github.event.repository.name }}
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: 'pages'
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: pip
cache-dependency-path: requirements-build.txt
- uses: actions/setup-node@v4
with:
node-version: 24.x
- name: Install build dependencies
run: pip install -r requirements-build.txt
- name: Build the book
run: |
set -e
jupyter book build --html || jupyter-book build --html
[ -d "_build/site" ] && cp -r _build/site _build/html || [ -d "_build/html" ]
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./_build/html
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GH Pages
id: deployment
uses: actions/deploy-pages@v4