Skip to content

Update build.yml

Update build.yml #90

Workflow file for this run

name: deploy-book
on:
push:
branches:
- main
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
build-book:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v5
- uses: prefix-dev/setup-pixi@v0.9.2
with:
pixi-version: v0.64.0
- name: Build the book
run: pixi run book-ci
- uses: actions/upload-artifact@v6
with:
name: jupyterbook
path: _build/html/*
if-no-files-found: error
build-pyodide:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v5
- uses: astral-sh/setup-uv@v7
- name: Build the Pyodide output
run: |
uvx nox -s pyodide
- uses: actions/upload-artifact@v6
with:
name: jupyterlite
path: _output/*
if-no-files-found: error
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-slim
needs: [build-book, build-pyodide]
if: github.event_name == 'push'
steps:
- name: Setup Pages
uses: actions/configure-pages@v5
- uses: actions/download-artifact@v6
with:
name: jupyterbook
path: public
- uses: actions/download-artifact@v6
with:
name: jupyterlite
path: public/live
- name: Upload artifact
uses: actions/upload-pages-artifact@v4
with:
path: public
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4