GitHub Action Validate Markdown - SSWConsulting/SSW.Rules.Content GitHub Wiki

This GitHub Action automatically lints and auto-fixes Markdown files in pull requests. It helps enforce consistent formatting and style using markdownlint, while also leaving helpful comments on the PR if issues remain.

When It Runs

  • On pull requests to main, but only if .md files are changed

  • Manually, using the "Run workflow" button in the Actions tab

What It Does

1. Checks out the PR branch

2. Detects changed Markdown files

3. Installs markdownlint-cli for linting and fixing Markdown

4. Automatically fixes common issues

5. Lints the Markdown again (if not from a fork)

6. Comments on the PR (if issues found and PR is not from a fork)