feat: Set up markdownlint GitHub Action for automated linting (Closes #14) #9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Linting | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| # This identifies which files changed in the specific commit or PR | |
| - uses: tj-actions/changed-files@v47 | |
| id: changed-files | |
| with: | |
| files: '**/*.md' | |
| separator: "," | |
| # This runs the linter ONLY on the files identified above | |
| - uses: DavidAnson/markdownlint-cli2-action@v22 | |
| if: steps.changed-files.outputs.any_changed == 'true' | |
| with: | |
| globs: ${{ steps.changed-files.outputs.all_changed_files }} | |
| separator: "," |