diff --git a/.github/workflows/lint_md_all.yml b/.github/workflows/lint_md_all.yml new file mode 100644 index 00000000..f59ee4f5 --- /dev/null +++ b/.github/workflows/lint_md_all.yml @@ -0,0 +1,15 @@ +name: "Lint Markdown (all)" + +on: + workflow_dispatch: + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: DavidAnson/markdownlint-cli2-action@v13 + with: + globs: | + *.md + !test/*.md diff --git a/.github/workflows/lint_md_changes.yml b/.github/workflows/lint_md_changes.yml new file mode 100644 index 00000000..5c85b77d --- /dev/null +++ b/.github/workflows/lint_md_changes.yml @@ -0,0 +1,20 @@ +name: "Lint Markdown (Changes)" +on: [push, pull_request] + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: tj-actions/changed-files@v40 + id: changed-files + with: + files: '**/*.md' + separator: "," + - uses: DavidAnson/markdownlint-cli2-action@v13 + if: steps.changed-files.outputs.any_changed == 'true' + with: + globs: ${{ steps.changed-files.outputs.all_changed_files }} + separator: ","