-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split out docs build to trigger only if docs are changed
- Loading branch information
Showing
2 changed files
with
48 additions
and
39 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Docs | ||
on: | ||
push: | ||
paths: | ||
- 'docs/' | ||
pull_request: | ||
paths: | ||
- 'docs/' | ||
|
||
jobs: | ||
docs: | ||
name: Build Docs | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: docs/ | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.10' | ||
|
||
- name: Setup Poetry | ||
uses: abatilo/actions-poetry@v2 | ||
|
||
- name: Cache the virtualenv | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/.cache/pypoetry | ||
key: venv-${{ hashFiles('poetry.lock') }} | ||
|
||
- name: Install Poetry dependencies | ||
run: poetry install | ||
|
||
- name: Build Sphinx docs | ||
run: poetry run sphinx-build -M dirhtml . _build | ||
|
||
- name: Install and run Vale | ||
run: | | ||
poetry add vale | ||
poetry run vale sync | ||
poetry run vale . |