diff --git a/.github/workflows/builds.yml b/.github/workflows/build-docs.yml similarity index 78% rename from .github/workflows/builds.yml rename to .github/workflows/build-docs.yml index be0ea25a..4ebbec4b 100644 --- a/.github/workflows/builds.yml +++ b/.github/workflows/build-docs.yml @@ -1,7 +1,13 @@ -name: Builds +name: Build documentation on: - - push - - pull_request + push: + paths: + - docs/** + - .sphinx/** + pull_request: + paths: + - docs/** + - .sphinx/** permissions: contents: read diff --git a/.github/workflows/test-docs.yml b/.github/workflows/test-docs.yml new file mode 100644 index 00000000..e33ed753 --- /dev/null +++ b/.github/workflows/test-docs.yml @@ -0,0 +1,48 @@ +name: Documentation tests +on: + push: + paths: + - "**.md" + - .sphinx/** + - doc/** + pull_request: + paths: + - "**.md" + - .sphinx/** + - doc/** + +permissions: + contents: read + +jobs: + documentation: + name: Documentation tests + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install dependencies + run: | + sudo apt-get install aspell aspell-en + sudo snap install mdl + + - name: Run markdown linter + run: | + make doc-lint + + - name: Run spell checker + run: | + make doc-spellcheck + + - name: Run inclusive naming checker + uses: get-woke/woke-action@v0 + with: + fail-on-error: true + woke-args: "*.md **/*.md -c https://github.com/canonical-web-and-design/Inclusive-naming/raw/main/config.yml" + + - name: Run link checker + # This can fail intermittently due to external resources being unavailable. + continue-on-error: true + run: | + make doc-linkcheck diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index fd9f2943..d0f5e402 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,7 +1,15 @@ -name: Tests +name: Code tests on: - - push - - pull_request + push: + paths-ignore: + - "**.md" + - .sphinx/** + - doc/** + pull_request: + paths-ignore: + - "**.md" + - .sphinx/** + - doc/** permissions: contents: read @@ -53,35 +61,3 @@ jobs: - name: Unit tests (all) run: make check - - documentation: - name: Documentation tests - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Install dependencies - run: | - sudo apt-get install aspell aspell-en - sudo snap install mdl - - - name: Run markdown linter - run: | - make doc-lint - - - name: Run spell checker - run: | - make doc-spellcheck - - - name: Run inclusive naming checker - uses: get-woke/woke-action@v0 - with: - fail-on-error: true - woke-args: "*.md **/*.md -c https://github.com/canonical-web-and-design/Inclusive-naming/raw/main/config.yml" - - - name: Run link checker - # This can fail intermittently due to external resources being unavailable. - continue-on-error: true - run: | - make doc-linkcheck