Fix docs #196
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: Build API Documentation | |
on: | |
push: | |
branches: | |
# We only want to deploy new documentation updates | |
# when there are changes in the `develop` branch. | |
- develop | |
jobs: | |
docs: | |
name: Build API Documentation | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 15 | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.10' | |
# The https://github.com/marketplace/actions/sphinx-build Github Action can | |
# run `pip install` but it fails to gather other system package | |
# requirements, even when using the `pre-build-command` hook. | |
# Instead of relying on that Github Action, let's install all the | |
# dependencies ourselves. | |
- name: Install Dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install --yes libxmlsec1-dev libxml2-dev libxmlsec1-openssl | |
python -m pip install --upgrade pip | |
pip install -r requirements-dev.txt | |
# The `make html` command will run Sphinx to build the documentation. | |
- name: Build Docs | |
run: | | |
export SIMPLIFIED_STATIC_DIR="$(pwd)/resources" | |
cd docs | |
make html | |
cd .. | |
# Deploy to http://nypl-simplified.github.io/circulation/ | |
- name: Deploy 🚀 | |
uses: JamesIves/[email protected] | |
with: | |
branch: gh-pages # The branch the action should deploy to. | |
folder: docs/build/html # The folder the action should deploy. | |