Skip to content

equations

equations #17

name: build-deploy-book
# Only run this when the main branch changes
on:
push:
branches:
- 'develop'
pull_request:
branches:
- 'develop'
# Allow workflow to be dispatched on demand
workflow_dispatch:
# Allow one concurrent deployment
concurrency:
group: pages
cancel-in-progress: true
jobs:
# This job installs dependencies and builds the book
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
# Install dependencies
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: |
pip install -r ci/requirements.txt
# # Testing
# - name: Detect and configure production environment
# if: github.repository == 'CLIMAAX/crabook'
# run: |
# echo "Repository: ${{github.repository}}"
# echo "Substituting production ToC"
# mv crabook/_toc_prod.yml crabook/_toc.yml
# Build the book
- name: Build the book
run: |
jupyter-book build .
- name: Upload build
if: github.ref == 'refs/heads/develop'
uses: actions/upload-pages-artifact@v3
with:
path: ./_build/html
# This job publishes the book to Github Pages
deploy:
if: github.ref == 'refs/heads/develop'
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy
id: deployment
uses: actions/deploy-pages@v4