Skip to content

Merge pull request #112 from ukhsa-collaboration/feature/build_wheels #5

Merge pull request #112 from ukhsa-collaboration/feature/build_wheels

Merge pull request #112 from ukhsa-collaboration/feature/build_wheels #5

Workflow file for this run

name: build-book
# only run when specific files change
# only run on install-fix-docs branch
# TODO change this to dev/main branch once integrated
on:
push:
branches:
- master
- dev
jobs:
build-book:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
steps:
- uses: actions/checkout@v3
- name: Setup Graphviz
uses: ts-graphviz/setup-graphviz@v1
# install python
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: 3.10
# set up pygom
- name: Build and install pygom
run: |
python -m pip install --upgrade pip
pip install .
# install dependencies
- name: Install documentation dependencies
run: |
pip install -r docs/requirements.txt
# build the book
# TODO check which flags are needed, -W
- name: Build the book
run: |
jupyter-book build --all -v docs/
# deploy book to github-pages
- name: GitHub Pages
uses: peaceiris/actions-gh-pages@v4
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/_build/html
# deploy book to github-pages dev
- name: GitHub Pages dev
uses: peaceiris/actions-gh-pages@v4
if: github.ref == 'refs/heads/dev'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/_build/html
destination_dir: dev