build: update blacken-docs dependency #4
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 | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
python-version: [3.9] | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
id: setup-python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Load cached Poetry installation | |
id: cached-poetry | |
uses: actions/cache@v3 | |
with: | |
path: ~/.local # the path depends on the OS | |
key: poetry-1 # increment to reset cache | |
- name: Install Poetry | |
if: steps.cached-poetry.outputs.cache-hit != 'true' | |
uses: snok/install-poetry@v1 | |
- name: Load cached venv | |
id: cached-poetry-dependencies | |
uses: actions/cache@v3 | |
with: | |
path: .venv | |
key: venv-${{ hashFiles('**/poetry.lock') }} | |
- name: Install dependencies | |
run: | | |
poetry config virtualenvs.create true | |
poetry config virtualenvs.in-project true | |
poetry install --no-interaction | |
- name: Build book | |
run: | | |
poetry run jupyter-book build book | |
- name: GitHub Pages action | |
uses: peaceiris/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: book/_build/html | |
publish_branch: gh-pages |