Skip to content

Merge pull request #25 from SECQUOIA/copilot/fix-71ee1170-e764-4d16-a… #35

Merge pull request #25 from SECQUOIA/copilot/fix-71ee1170-e764-4d16-a…

Merge pull request #25 from SECQUOIA/copilot/fix-71ee1170-e764-4d16-a… #35

Workflow file for this run

name: Deploy Jupyter Book
# Run this when the master or main branch changes
on:
push:
branches:
- master
- main
# If your git repository has the Jupyter Book within some-subfolder next to
# unrelated files, you can make this run only if a file within that specific
# folder has been modified.
#
# paths:
# - some-subfolder/**
# This job installs dependencies, builds the book, and pushes it to `gh-pages`
jobs:
deploy-book:
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
contents: read
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install system dependencies
run: |
sudo apt update
sudo apt-get install -y -qq glpk-utils coinor-cbc
- name: Setup Micromamba for IPOPT installation
uses: mamba-org/setup-micromamba@v1
with:
environment-name: solvers
create-args: >-
-c conda-forge
ipopt
continue-on-error: true
- name: Add IPOPT to PATH
run: |
echo "${MAMBA_ROOT_PREFIX}/envs/solvers/bin" >> $GITHUB_PATH
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install Python dependencies
run: |
pip install --upgrade pip
pip install -r requirements.txt
pip install openpyxl
# Build the book
- name: Build the book
run: |
jupyter-book build . --keep-going
# Check for critical build errors
- name: Check build success
run: |
if [ ! -f "_build/html/index.html" ]; then
echo "Error: index.html was not generated"
exit 1
fi
echo "Build completed successfully"
# Upload build logs if there were warnings
- name: Upload build reports
if: always()
uses: actions/upload-artifact@v4
with:
name: build-reports
path: |
_build/html/reports/
retention-days: 30
# Upload the book's HTML as an artifact
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: "_build/html"
# Deploy the book's HTML to GitHub Pages
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4