From 8de5fb4257f0fa491cd6f23e9f0f276094a64418 Mon Sep 17 00:00:00 2001 From: Daniel Mohns Date: Thu, 26 Oct 2023 10:59:00 +0200 Subject: [PATCH] Improve `markdownlint` CI setup --- .../workflows/{lint.yaml => markdown-lint.yaml} | 15 +++++++++------ .markdownlint-cli2.yaml | 13 +++++++++++++ .markdownlint.yaml | 10 ---------- 3 files changed, 22 insertions(+), 16 deletions(-) rename .github/workflows/{lint.yaml => markdown-lint.yaml} (60%) create mode 100644 .markdownlint-cli2.yaml delete mode 100644 .markdownlint.yaml diff --git a/.github/workflows/lint.yaml b/.github/workflows/markdown-lint.yaml similarity index 60% rename from .github/workflows/lint.yaml rename to .github/workflows/markdown-lint.yaml index a1416af..392e6e8 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/markdown-lint.yaml @@ -1,15 +1,18 @@ -name: Lint +name: Markdown Lint -on: [push, pull_request] +on: + push: + branches: + - main + pull_request: + branches: + - main jobs: - lint: + markdownlint: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 - name: Run markdownlint uses: DavidAnson/markdownlint-cli2-action@v13 - with: - globs: | - docs/**/*.md diff --git a/.markdownlint-cli2.yaml b/.markdownlint-cli2.yaml new file mode 100644 index 0000000..8514891 --- /dev/null +++ b/.markdownlint-cli2.yaml @@ -0,0 +1,13 @@ +# Disable some built-in rules +config: + line-length: false + no-inline-html: false + first-line-h1: false + +# Define glob expressions to use (only valid at root) +globs: + - "**/*.md" + +# Define glob expressions to ignore +# ignores: +# - "ignore*.md" \ No newline at end of file diff --git a/.markdownlint.yaml b/.markdownlint.yaml deleted file mode 100644 index 56e164c..0000000 --- a/.markdownlint.yaml +++ /dev/null @@ -1,10 +0,0 @@ -# Example markdownlint configuration with all properties set to their default value - -# Default state for all rules -default: true - -# MD013/line-length - Line length -MD013: false - -# MD033/no-inline-html - Inline HTML -MD033: false