From d6ce9cd31720a56271fa808dd43856cb3a3999bb Mon Sep 17 00:00:00 2001 From: Swissky <12152583+swisskyrepo@users.noreply.github.com> Date: Wed, 13 Nov 2024 12:29:42 +0100 Subject: [PATCH] Github Action - Markdown Linting for PR --- .github/.markdownlint.json | 6 +++++ .github/workflows/check-markdown.yml | 23 +++++++++++++++++++ .../workflows/{ci.yml => mkdocs-build.yml} | 2 +- 3 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 .github/.markdownlint.json create mode 100644 .github/workflows/check-markdown.yml rename .github/workflows/{ci.yml => mkdocs-build.yml} (97%) diff --git a/.github/.markdownlint.json b/.github/.markdownlint.json new file mode 100644 index 0000000..a4058c3 --- /dev/null +++ b/.github/.markdownlint.json @@ -0,0 +1,6 @@ +{ + "MD013": false, + "ul-indent": { + "indent": 4 + } +} \ No newline at end of file diff --git a/.github/workflows/check-markdown.yml b/.github/workflows/check-markdown.yml new file mode 100644 index 0000000..ea926dd --- /dev/null +++ b/.github/workflows/check-markdown.yml @@ -0,0 +1,23 @@ +name: check-markdown +on: [pull_request] + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - uses: tj-actions/changed-files@v45 + id: changed-files + with: + files: '**/*.md' + separator: "," + + - uses: DavidAnson/markdownlint-cli2-action@v17 + if: steps.changed-files.outputs.any_changed == 'true' + with: + globs: ${{ steps.changed-files.outputs.all_changed_files }} + separator: "," + config: ./.github/.markdownlint.json \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/mkdocs-build.yml similarity index 97% rename from .github/workflows/ci.yml rename to .github/workflows/mkdocs-build.yml index bff1d9d..066ec92 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/mkdocs-build.yml @@ -1,4 +1,4 @@ -name: ci +name: mkdocs-build on: push: branches: