diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 39eae4b..9241801 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -54,6 +54,46 @@ jobs: tox-envs: "py,coverage-report,typing" tox-requirements: requirements/tox.txt + docs: + runs-on: ubuntu-latest + timeout-minutes: 15 + steps: + - uses: actions/checkout@v4 + with: + # Ensure the documentation gets the right version. + fetch-depth: 0 + - uses: lsst-sqre/run-tox@v1 + with: + python-version: "3.12" + tox-envs: docs + tox-requirements: "requirements/tox.txt" + cache-key-prefix: docs + # Only attempt documentation uploads for long-lived branches, tagged + # releases, and pull requests from ticket branches. This avoids version + # clutter in the docs and failures when a PR doesn't have access to + # secrets. + - uses: lsst-sqre/ltd-upload@v1 + with: + project: ghostwriter + dir: "docs/_build/html" + username: ${{ secrets.LTD_USERNAME }} + password: ${{ secrets.LTD_PASSWORD }} + if: > + github.event_name != 'merge_group' + && (github.event_name != 'pull_request' + || startsWith(github.head_ref, 'tickets/')) + linkcheck: + runs-on: ubuntu-latest + timeout-minutes: 15 + steps: + - uses: actions/checkout@v4 + - name: Check links + uses: lsst-sqre/run-tox@v1 + with: + python-version: "3.12" + tox-envs: docs-linkcheck + tox-requirements: "requirements/tox.txt" + build: runs-on: ubuntu-latest needs: [lint, test]