Check Documentation #1019
This file contains hidden or 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 Documentation | |
| on: | |
| schedule: | |
| - cron: '0 0 * * *' | |
| pull_request: | |
| paths: | |
| - docs/** | |
| - scenedetect/** | |
| - website/** | |
| push: | |
| paths: | |
| - docs/** | |
| - scenedetect/** | |
| - website/** | |
| branches: | |
| - main | |
| - 'releases/**' | |
| tags: | |
| - 'v*' | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| # Skip scheduled runs in forks: GitHub attributes cron runs to the upstream | |
| # workflow author, who then gets emailed when a fork's nightly build fails. | |
| if: github.repository_owner == 'Breakthrough' || github.event_name != 'schedule' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Set up Python 3.12 | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.12' | |
| cache: 'pip' | |
| - name: Install Dependencies | |
| run: | | |
| python -m pip install --upgrade pip build wheel virtualenv | |
| pip install .[docs,website] | |
| pip install -r packaging/windows/requirements.txt | |
| - name: Check CLI Documentation | |
| shell: bash | |
| run: | | |
| if [[ `git status --porcelain=1 | wc -l` -ne 0 ]]; then | |
| echo "CLI documentation is of date: docs/cli.rst does not match output after running docs/generate_cli_docs.py!" | |
| echo "Re-run `python docs/generate_cli_docs.py` to update and commit the result." | |
| exit 1 | |
| fi | |
| - name: Build Sphinx Reference (warnings as errors) | |
| shell: bash | |
| run: | | |
| sphinx-build -W --keep-going -b html docs docs/_build/html | |
| - name: Build MkDocs Website (--strict) | |
| shell: bash | |
| run: | | |
| mkdocs build --strict -f website/mkdocs.yml |