ci(docs): fail PRs on broken Mintlify internal links - #1405
Conversation
There was a problem hiding this comment.
Why have you changed these links?
There was a problem hiding this comment.
Good question. Those link changes were not random. The new check runs mintlify broken-links, which is what you suggested as a follow up in #1362. That tool fails on page links that start with /docs, because Mintlify already adds /docs when you click them. So if the href already has /docs, you can end up on /docs/docs and get a 404. That is the same thing #1341 fixed. Those link cleanups are already on main from #1407, so I rebased and took the doc file changes out of this PR. This PR is only the CI check now.
There was a problem hiding this comment.
Makes sense. I haven't checked myself, but to be sure we can confirm all the links resolve properly by running the development server locally.
There was a problem hiding this comment.
Why not edit an existing workflow rather than create a new workflow file docs-links.yml?
There was a problem hiding this comment.
Agreed. Having a separate workflow file was unnecessary. I moved the check into the existing CI workflow so it reuses the same install steps, and I deleted docs-links.yml.
e017c93 to
2cb4a7b
Compare
Add apps/docs check-links (mintlify broken-links) and run it in the existing CI workflow. Assert a clean report because mintlify 4.2.x can exit 0 even when broken links are printed. Fixes supermemoryai#1365
2cb4a7b to
e382532
Compare
Summary
apps/docsscriptcheck-links(mintlify broken-links) as the local and CI entrypoint.github/workflows/ci.ymlQuality Checks job after installno broken links foundreport because mintlify 4.2.x can exit 0 even when it prints broken linksFixes #1365
Test plan
mintlify broken-links/bun run check-linkson Linux againstapps/docsreportssuccess no broken links found