Add source.coop link (#137) #58
This file contains 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
# https://jupyterbook.org/en/stable/publish/gh-pages.html#automatically-host-your-book-with-github-actions | |
name: deploy-book | |
# Only run this when the main branch changes | |
on: | |
# Uncomment the 'pull_request' line below to manually re-build Jupyter Book | |
# pull_request: | |
push: | |
branches: | |
- 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: | |
- '.github/workflows/deploy-book.yml' | |
- 'docs/**' | |
# Allow one concurrent deployment | |
concurrency: | |
group: "pages" | |
cancel-in-progress: true | |
jobs: | |
# This job installs dependencies, builds the book, and pushes it to `gh-pages` | |
build-book: | |
runs-on: ubuntu-22.04 | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
# Checkout current git repository | |
- name: Checkout | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
# Enable GitHub Pages and extract various metadata about a site | |
- name: Setup Pages | |
uses: actions/configure-pages@1f0c5cde4bc74cd7e1254d0cb4de8d49e9068c7d # v4.0.0 | |
# Install Micromamba with conda-forge dependencies | |
- name: Setup Micromamba | |
uses: mamba-org/setup-micromamba@e820223f89c8720d6c740ca154a7adf32fcd278a # v1.7.3 | |
with: | |
environment-name: claymodel | |
condarc: | | |
channels: | |
- conda-forge | |
- nodefaults | |
create-args: >- | |
python=3.11 | |
jupyter-book=0.15.1 | |
# Build the Jupyter book | |
- name: Build the book | |
run: jupyter-book build docs/ | |
# Upload the built HTML to GitHub Artifacts | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@a753861a5debcf57bf8b404356158c8e1e33150c # v2.0.0 | |
with: | |
path: docs/_build/html | |
# This job downloads the built HTML artifacts and deploys the webpage | |
deploy-pages: | |
runs-on: ubuntu-22.04 | |
# Add a dependency to the build job | |
needs: build-book | |
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment | |
permissions: | |
pages: write # to deploy to Pages | |
id-token: write # to verify the deployment originates from an appropriate source | |
# Deploy to the github-pages environment | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
# Push the book's HTML to github-pages | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@13b55b33dd8996121833dbc1db458c793a334630 # v3.0.1 |