Skip to content

Commit

Permalink
Test all pull requests for docs (#536)
Browse files Browse the repository at this point in the history
* WIP - Test the docs

Related to #526

Add a command to build the documentation using Sphinx and update the CI workflow to include a documentation build stage.

* **run.sh**
  - Add a command to build the documentation using Sphinx.
  - Update the usage function to include the new builddocs command.

* **.github/workflows/python-package.yml**
  - Add a new stage to run the documentation building to ensure it works.
  - Update the release-production stage to depend on the new docs stage.

* refactor: simplify changes

* refactor: undo changes to run.sh
  • Loading branch information
dancergraham authored Dec 28, 2024
1 parent 2b81166 commit 7f0d532
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7f0d532

Please sign in to comment.