
So these won't go out of date. This does mean the environment has be setup a bit more carefully so the right version of the tool is used, but thankfully the build environment is rebuilt on change on RTD anyway. Also since the HTML docs are known to build fine, let's provide downloadable HTMLzips of our docs. This change needs RTD and GH to install Black with the [d] extra so blackd's help can generated. While editing RTD's config file, let's migrate the file to a non-deprecated filename. Also I missed adding AUTHORS.md to the files key in the doc GHA config.
45 lines
1.1 KiB
YAML
45 lines
1.1 KiB
YAML
name: Documentation Build
|
|
|
|
on:
|
|
push:
|
|
paths:
|
|
- "docs/**"
|
|
- "README.md"
|
|
- "CHANGES.md"
|
|
- "CONTRIBUTING.md"
|
|
- "AUTHORS.md"
|
|
pull_request:
|
|
paths:
|
|
- "docs/**"
|
|
- "README.md"
|
|
- "CHANGES.md"
|
|
- "CONTRIBUTING.md"
|
|
- "AUTHORS.md"
|
|
|
|
jobs:
|
|
build:
|
|
# We want to run on external PRs, but not on our own internal PRs as they'll be run
|
|
# by the push to the branch. Without this if check, checks are duplicated since
|
|
# internal PRs match both the push and pull_request events.
|
|
if:
|
|
github.event_name == 'push' || github.event.pull_request.head.repo.full_name !=
|
|
github.repository
|
|
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Set up Python 3.9
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: 3.9
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip setuptools wheel
|
|
python -m pip install -e ".[d]"
|
|
python -m pip install -r "docs/requirements.txt"
|
|
|
|
- name: Build documentation
|
|
run: sphinx-build -a -b html -W --keep-going docs/ docs/_build
|