Merge pull request #74 from aertslab/dev #113
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: Check Sphinx Docs | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
docs: | |
name: Build Sphinx Documentation | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash -eo pipefail {0} # Fail on error and enable pipefail | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.11 | |
cache: "pip" | |
cache-dependency-path: "**/pyproject.toml" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip wheel | |
pip install ".[doc]" | |
- name: Build Documentation and Check for Issues | |
working-directory: docs | |
run: | | |
make clean | |
# Build the docs and capture output, treat warnings as errors (-W) | |
sphinx-build -b html -W . _build/html 2>&1 | tee sphinx-output.log | |
- name: Upload Log if Build Failed | |
if: failure() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: sphinx-output-log | |
path: docs/sphinx-output.log |