Skip to content

deploy-docs

deploy-docs #1

Workflow file for this run

name: deploy-docs
on:
release:
types: [published]
workflow_dispatch:
inputs:
tag:
description: Tag for manually running the deploy book workflow
required: True
default: ''
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: mamba-org/setup-micromamba@v1
with:
environment-file: environment.yml
# Setup GH pages
- name: Setup Pages
id: pages
uses: actions/configure-pages@v5
# Build docs
- name: Build docs
run: |
pip install jupyter-book
jupyter-book build .
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./_build/html
deploy:
needs: build
permissions:
pages: write
id-token: write
# Deploy to the GH pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
# Specify runner + deployment step
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4