K collie/278 vuv cwup cwuv #641
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
# This workflow will test that documentation is successfully generated | |
name: sphinx docs | |
on: | |
workflow_dispatch: | |
pull_request: | |
push: | |
branches: | |
- master | |
- develop | |
paths: | |
- .github/workflows/docs.yml | |
- indica/** | |
- doc/** | |
- poetry.lock | |
jobs: | |
docs: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 # should match value in .readthedocs.yml | |
- name: Install Poetry | |
uses: abatilo/[email protected] | |
with: | |
poetry-version: 1.4.2 | |
- name: Configure poetry | |
shell: bash | |
run: python -m poetry config virtualenvs.in-project true | |
- name: Set up cache | |
uses: actions/cache@v2 | |
id: cache | |
with: | |
path: .venv | |
key: venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }} | |
- name: Ensure cache is healthy | |
if: steps.cache.outputs.cache-hit == 'true' | |
shell: bash | |
run: timeout 10s python -m poetry run pip --version || rm -rf .venv | |
- name: Install dependencies | |
shell: bash | |
run: | | |
python -m poetry install | |
- name: Install plantuml | |
shell: bash | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y plantuml | |
- name: Test docs build successfully | |
run: source .venv/bin/activate && | |
make -C doc html SPHINXOPTS="-W --keep-going" |