diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 604823a8..f3c15cd9 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -105,13 +105,33 @@ jobs: run: | tox -e i18n + docs: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + - uses: actions/cache@v4 + with: + path: ~/.cache/pip + key: ${{ matrix.python-version }}-pip-${{ hashFiles('**/requirements.txt') }} + restore-keys: | + ${{ matrix.python-version }}-pip- + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install sphinx + - name: Build docs + run: | + sphinx-build -b html docs docs/_build + release-production: # Only upload if a tag is pushed (otherwise just build & check) if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') runs-on: ubuntu-latest - needs: [test, lint, i18n] + needs: [test, lint, i18n, docs] steps: - uses: actions/checkout@v4