Add Colab per-page launch + license badges #16
Workflow file for this run
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: Build and Deploy Jupyter Book | |
| on: | |
| push: | |
| branches: [ main ] | |
| paths: | |
| - "**/*.ipynb" | |
| - ".github/workflows/jupyter-book.yml" | |
| - "myst.yml" | |
| - "README.md" | |
| pull_request: | |
| branches: [ main ] | |
| paths: | |
| - "**/*.ipynb" | |
| - ".github/workflows/jupyter-book.yml" | |
| - "myst.yml" | |
| - "README.md" | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: "pages-${{ github.ref }}" | |
| cancel-in-progress: true | |
| jobs: | |
| # Build job - runs on both PRs and pushes to main | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.10' | |
| - name: Install Jupyter Book v2 | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install jupyter-book | |
| - name: Build Jupyter Book | |
| run: | | |
| jupyter book build --html --ci | |
| env: | |
| BASE_URL: /PU_CHE597_DSinChemE/ | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: "_build/html" | |
| # Deploy job - only runs on push to main (not on PRs) | |
| deploy: | |
| needs: build | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |