Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 42 additions & 12 deletions .github/workflows/automatic-doc-checks.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,53 @@
#
name: Automatic doc checks
name: Documentation

on:
push:
branches: [ main ]
branches:
- main
pull_request:
paths:
- 'docs/**' # Only run on changes to the docs directory
- "docs/**"

workflow_dispatch:
# Manual trigger
env:
DOCS_DIR: "docs"
PYTHON_VERSION: "3.10"

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
cancel-in-progress: true

jobs:
documentation-checks:
uses: canonical/documentation-workflows/.github/workflows/documentation-checks.yaml@main
with:
working-directory: "docs"
fetch-depth: 0
checks:
name: ${{ matrix.check.name }}
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
check:
- name: Spelling check
target: spelling
- name: Link check
target: linkcheck
- name: Inclusive language check
target: woke
Comment thread
jahn-junior marked this conversation as resolved.
defaults:
run:
working-directory: ${{ env.DOCS_DIR }}
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: ${{ env.PYTHON_VERSION }}
cache: "pip"
cache-dependency-path: ${{ env.DOCS_DIR }}/requirements.txt

- name: Run check
run: make ${{ matrix.check.target }}
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,17 @@
* Skip pa11y installation if it is already present
* Update `CONTRIBUTING.md` to include versioning and breaking changes policy
* Remove extensions deprecated in 2.0
* Replace remote documentation checks in CI

### Changed

* `docs/conf.py` [#610](https://github.com/canonical/sphinx-stack/pull/610), [#634](https://github.com/canonical/sphinx-stack/pull/634), [#646](https://github.com/canonical/sphinx-stack/pull/646)
* `docs/Makefile` [#605](https://github.com/canonical/sphinx-stack/pull/605), [#610](https://github.com/canonical/sphinx-stack/pull/610), [#627](https://github.com/canonical/sphinx-stack/pull/627), [#628](https://github.com/canonical/sphinx-stack/pull/628)
* `docs/requirements.txt` [#634](https://github.com/canonical/sphinx-stack/pull/634), [#646](https://github.com/canonical/sphinx-stack/pull/646)
* `README.md` [#603](https://github.com/canonical/sphinx-stack/pull/603)
* `.github/workflows/automatic-doc-checks.yml` [#642](https://github.com/canonical/sphinx-stack/pull/642)
* `.github/workflows/cla-check.yml` [#606](https://github.com/canonical/sphinx-stack/pull/606)
* `.github/workflows/check-removed-urls.yml` [#612](https://github.com/canonical/sphinx-stack/pull/#612)
* `CONTRIBUTING.md` [#632](https://github.com/canonical/sphinx-stack/pull/632)

## 2.0

Expand Down
15 changes: 7 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -349,17 +349,16 @@ branches should ensure they have signed the CLA before their changes are merged

### Checks on changes to `docs/` only

- Markdown style check: Runs `pymarkdownlnt` on Markdown files
- Automatic documentation checks: Runs upstream documentation workflow checks. The
project uses
[canonical/documentation-workflows](https://github.com/canonical/documentation-workflows)
for automatic documentation checks. To modify this part of CI behavior, pass inputs to
upstream workflows rather than creating or customizing local copies.
- Spelling check: Checks spelling in the documentation with Vale
- Link check: Check external links in the documentation with the Sphinx `linkcheck`
builder
- Inclusive language check: Ensure the documentation uses inclusive language with Vale
- Markdown style check: Lint the Markdown source with `pymarkdownlnt`

### Optional checks (allowed to fail)

- Style guide check (`vale`): Checks compliance with the Canonical style guide
- Accessibility check (`pa11y`): Checks accessibility of generated HTML
- Style guide check: Checks compliance with the Canonical style guide with Vale
- Accessibility check: Checks the accessibility of generated HTML with Pa11y

## Review process

Expand Down
Loading