Skip to content

call-deploy-book

call-deploy-book #208

name: call-deploy-book
# Deploys the Jupyter Book using a reusable workflow when changes are pushed to main.
# Limited to relevant paths to avoid unnecessary runs; can also be triggered manually.
on:
push:
branches:
- main
# Only run when book or dependency files change (or this workflow itself)
paths:
- book/**
- requirements.txt
- .github/workflows/call-deploy-book.yml
# Allow manual runs from the GitHub UI
workflow_dispatch:
jobs:
call-workflow:
# Reuse the standard TeachBooks deploy workflow to build and publish the book
uses: TeachBooks/deploy-book-workflow/.github/workflows/deploy-book.yml@main
# Pass repository secrets through to the called workflow
secrets: inherit
permissions:
# Required to read repository content (e.g., during checkout)
contents: read
# Required to publish to GitHub Pages
pages: write
# Required for OIDC authentication during Pages deployment
id-token: write