From a998ce82b8a388255aebf21b9ff6b727830b393e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Muller?= Date: Tue, 2 Jul 2024 21:13:17 +0200 Subject: [PATCH] Create workflow to lint Markdown files --- .github/workflows/lint-markdown.yml | 25 +++++++++++++++++++++++++ .markdownlint.jsonc | 8 ++++++++ 2 files changed, 33 insertions(+) create mode 100644 .github/workflows/lint-markdown.yml create mode 100644 .markdownlint.jsonc diff --git a/.github/workflows/lint-markdown.yml b/.github/workflows/lint-markdown.yml new file mode 100644 index 000000000..8b3e2c8d7 --- /dev/null +++ b/.github/workflows/lint-markdown.yml @@ -0,0 +1,25 @@ +name: "Lint Markdown" + +on: + merge_group: + pull_request: + push: + branches: [ master ] + +jobs: + lint_project: + name: "Lint Markdown" + runs-on: ubuntu-latest + permissions: + statuses: write + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Lint Markdown + uses: DavidAnson/markdownlint-cli2-action@v16 + with: + config: ".markdownlint.jsonc" + globs: "docs/**/*.md" diff --git a/.markdownlint.jsonc b/.markdownlint.jsonc new file mode 100644 index 000000000..75601d814 --- /dev/null +++ b/.markdownlint.jsonc @@ -0,0 +1,8 @@ +// https://github.com/DavidAnson/markdownlint/blob/main/schema/.markdownlint.jsonc +{ + "MD013": { + "line_length": 120, + "heading_line_length": 120, + "code_block_line_length": 120 + } +}