Skip to content

Merge pull request #2 from lhpeng/patch-1 #21

Merge pull request #2 from lhpeng/patch-1

Merge pull request #2 from lhpeng/patch-1 #21

Workflow file for this run

name: deploy
on:
# Trigger the workflow on push to main branch
push:
branches:
- main
# This job installs dependencies, build the book, and pushes it to `gh-pages`
jobs:
build-and-deploy-book:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: [3.8]
steps:
- uses: actions/checkout@v2
# Install dependencies
- name: Setup Miniconda Virtual Environment
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: tutorial
environment-file: environment.yml
python-version: ${{ matrix.python-version }}
auto-activate-base: false
# Build the book
- shell: bash -l {0}
run: |
conda activate tutorial
python -m ipykernel install --user --name tutorial --display-name "Python (tutorial)"
jupyter-book build iheadwater_hackweek_tutorials
# Deploy the book's HTML to gh-pages branch
- name: GitHub Pages action
uses: peaceiris/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: iheadwater_hackweek_tutorials/_build/html