Skip to content

Fix CI on windows and mac (#312) #892

Fix CI on windows and mac (#312)

Fix CI on windows and mac (#312) #892

Workflow file for this run

name: Deploy Website to GitHub Pages
on:
push:
branches: main
paths-ignore:
- ".devcontainer/**"
# 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:
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-20250221
- uses: prefix-dev/[email protected]
with:
manifest-path: pyproject.toml
cache: true
activate-environment: true
- name: Build JupyterBook
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 Folder
if: always()
uses: actions/upload-artifact@v4
with:
name: build
path: _build/
- name: Upload Pages Artifact
uses: actions/upload-pages-artifact@v3
with:
path: _build/html
# Publish Website to GitHub Pages if built successfully
deploy:
needs: build
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4