deploy-book #62
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
name: deploy-book | |
on: | |
release: | |
types: [published] | |
workflow_dispatch: | |
inputs: | |
tag: | |
description: Tag for manually running the deploy book workflow | |
required: True | |
default: '' | |
# This job installs dependencies, builds the book #TODO: and pushes it to `gh-pages` | |
jobs: | |
deploy-book: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: mamba-org/setup-micromamba@v1 | |
with: | |
environment-file: environment.yml | |
- name: Python info | |
run: | | |
which python | |
python --version | |
- name: Show pip list | |
run: | | |
pip list | |
# Build the book | |
- name: Build the book | |
run: | | |
pip install jupyter-book | |
jupyter-book build . | |
# Push the book's HTML to github-pages | |
- name: GitHub Pages action | |
uses: peaceiris/actions-gh-pages@v3.6.1 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./_build/html |