Merge pull request #26 from SECQUOIA/dependabot/pip/fonttools-4.61.0 #36
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 . | |
| # 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 |