Skip to content

deploy-book

deploy-book #10

Workflow file for this run

name: deploy-book
on:
release:
types: [published]
workflow_dispatch:
# This job installs dependencies, builds the book, and pushes it to `gh-pages`
jobs:
deploy-book:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Install dependencies
- name: Set up Python 3.11
uses: actions/setup-python@v1
with:
python-version: 3.11
- name: Install dependencies
run: |
pip install jupyter-book ou-jupyter-book-tools .
pip install git+https://github.com/innovationOUtside/sphinxcontrib-ou-xml-tags.git
# Build the book
- name: Build the book
run: |
jupyter-book build docs
- name: Generate OU-XML
run: |
jb build docs --builder custom --custom-builder xml
ouseful_obt docs
mkdir -p ./docs/_build/html/ouxml
mv ./docs/_build/ouxml/ouseful-demo-ou-xml_0.xml ./docs/_build/html/ouxml/index.xml
cp -r ./docs/examples ./docs/_build/html/examples
# 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: ./docs/_build/html