Check dead links #50
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 dead links | |
| on: | |
| workflow_dispatch: | |
| push: | |
| schedule: | |
| - cron: '0 0 1 * *' | |
| jobs: | |
| md-dead-link-check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - name: Check for invalid README.md links | |
| run: | | |
| echo "Checking for direct README.md links in src/ (excluding SUMMARY.md)..." | |
| # Find all .md files in src/ except SUMMARY.md | |
| find src/ -name "*.md" -not -name "SUMMARY.md" -type f | while read -r file; do | |
| # Check for links to README.md files | |
| if grep -n "\]\(.*README\.md\)" "$file"; then | |
| echo "❌ ERROR: Found direct README.md link in $file" | |
| echo " Links to README.md should use directory paths instead (e.g., ./dir/ not ./dir/README.md)" | |
| exit 1 | |
| fi | |
| done | |
| if [ $? -eq 0 ]; then | |
| echo "✅ No invalid README.md links found" | |
| fi | |
| - uses: AlexanderDokuchaev/md-dead-link-check@v1.2.0 |