Zero vale errors #330
Workflow file for this run
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: Check Markdown links | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| jobs: | |
| markdown-link-check: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 60 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Install markdown-link-check | |
| run: npm install -g markdown-link-check | |
| - name: Check all links (push to main) | |
| if: github.event_name == 'push' | |
| run: | | |
| find . -name '*.mdx' -print0 | xargs -0 -n1 markdown-link-check --config .github/mdl.config.json -q | |
| - name: Check changed files only (PR) | |
| if: github.event_name == 'pull_request' | |
| run: | | |
| CHANGED_FILES=$(git diff --name-only origin/${{ github.base_ref }}...HEAD -- '*.mdx') | |
| if [ -z "$CHANGED_FILES" ]; then | |
| echo "No .mdx files changed" | |
| exit 0 | |
| fi | |
| echo "Checking changed files:" | |
| echo "$CHANGED_FILES" | |
| echo "$CHANGED_FILES" | xargs -n1 markdown-link-check --config .github/mdl.config.json -q |