| name: Markdownlint (All files) | |
| on: | |
| pull_request: | |
| paths: | |
| - .markdownlint-cli2.jsonc | |
| - .nvmrc | |
| - .prettier* | |
| - package.json | |
| - package-lock.json | |
| - .github/workflows/markdown-lint.yml | |
| - .github/workflows/markdownlint-problem-matcher.json | |
| # No GITHUB_TOKEN permissions, as we only use it to increase API limit. | |
| permissions: {} | |
| jobs: | |
| docs: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Setup Node.js environment | |
| uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 | |
| with: | |
| node-version-file: ".nvmrc" | |
| cache: npm | |
| - name: Install | |
| run: npm ci | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Lint markdown files | |
| run: | | |
| echo "::add-matcher::.github/workflows/markdownlint-problem-matcher.json" | |
| npm run lint:md | |
| npm run lint:fm | |