Skip to content

Conversation

@mithro
Copy link
Contributor

@mithro mithro commented Jul 9, 2025

Summary

Adds a comprehensive GitHub Action workflow that automatically validates all links in ReadTheDocs preview deployments for pull requests.

Features

  • Smart waiting: Monitors ReadTheDocs build status and waits for preview to be available
  • Comprehensive link checking: Uses muffet to validate both internal and external links
  • Detailed reporting: Comments on PRs with results and provides full logs as artifacts
  • Quality gates: Prevents merging PRs with broken documentation links
  • Respectful crawling: Rate limiting and proper exclusions for social media sites

Workflow Details

  • Trigger: Pull requests to main branch
  • Timeout: 15 minutes (10 min for ReadTheDocs + 5 min for checking)
  • Tool: muffet link checker
  • Results: PR comments + workflow artifacts

Benefits

  • 🔍 Prevents broken links from reaching main branch
  • 🌐 Validates external references to ensure they remain accessible
  • 📊 Automated quality assurance with detailed reporting
  • 🎯 Improves documentation reliability for end users

Test Plan

  • Create a test PR to verify ReadTheDocs preview detection works
  • Test with intentionally broken internal link
  • Test with intentionally broken external link
  • Verify PR comment formatting and artifact upload
  • Confirm workflow fails appropriately for broken links

🤖 Generated with Claude Code

- Add comprehensive link-check.yml workflow that waits for ReadTheDocs preview deployment
- Uses muffet tool to validate all internal and external links
- Provides detailed PR comments with results and artifacts
- Excludes social media domains that typically block crawlers
- Includes rate limiting and proper user agent for respectful crawling
- Fails PR if broken links are found to prevent merging broken documentation
- Add workflow documentation and update CLAUDE.md with testing info
@read-the-docs-community
Copy link

read-the-docs-community bot commented Jul 9, 2025

Documentation build overview

📚 wafer-space | 🛠️ build #28801024 (0969334) | 🔍 preview

Files changed

Comparing with latest (5f8d26f)

Show files (2) | 1 modified | 1 added | 0 deleted
File Status
CLAUDE.html 📝 modified
.github/workflows/README.html ➕ added

- Add required permissions for commenting on PRs (pull-requests: write, issues: write)
- Fix ReadTheDocs URL pattern to use .org.readthedocs.build domain
- Update documentation to reflect correct URL pattern
- Resolves permission errors and incorrect URL construction
@github-actions
Copy link

github-actions bot commented Jul 9, 2025

🔍 Link Check Results - ❌ FAILED

ReadTheDocs Preview: https://wafer-space--15.org.readthedocs.build/en/15/

⚠️ Some links failed validation

🔍 Click to view detailed results
invalid argument for flag `-t, --timeout' (expected int): strconv.ParseInt: parsing "30s": invalid syntax

📊 Full results are available in the workflow artifacts.


Link check performed by muffet on commit fecbac6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants