ignoring cached exceptions (#8) #60
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: docs | |
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: | |
docs: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
python-version: [ "3.10" ] | |
steps: | |
# Checkout | |
- uses: actions/checkout@v2 | |
# Python setup | |
- name: Set up Python environment | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
# Install build dependencies | |
- name: Install build dependencies | |
run: python -m pip install --upgrade pip setuptools wheel poetry | |
# Setup Poetry caching | |
- name: Get Poetry cache dir | |
id: poetry-cache | |
run: echo "::set-output name=dir::$(poetry config cache-dir)" | |
- name: Poetry/Nox cache | |
uses: actions/cache@v2 | |
with: | |
path: ${{ steps.poetry-cache.outputs.dir }} | |
key: ${{ runner.os }}-${{ matrix.python-version }}-poetry-test-${{ hashFiles('**/poetry.lock') }} | |
restore-keys: | | |
${{ runner.os }}-${{ matrix.python-version }}-poetry-test- | |
${{ runner.os }}-${{ matrix.python-version }}-poetry- | |
- name: Install build dependencies | |
run: poetry install | |
- name: Export requirements.txt for binder | |
run: poetry export -f requirements.txt --output requirements.txt | |
- name: Install kernel | |
run: poetry run python -m ipykernel install --user --name deche | |
- name: Build the book | |
run: | | |
poetry run jupyter-book build docs | |
- name: GitHub Pages action | |
uses: peaceiris/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: docs/_build/html |