Add docs broken link checker CI workflow and fix broken links#21250
Add docs broken link checker CI workflow and fix broken links#21250desertaxle merged 6 commits intomainfrom
Conversation
Adds a local pre-commit hook that runs Mintlify's broken-links checker when files in docs/ are modified. Closes #13978 Co-authored-by: alex.s <alex.s@prefect.io> Co-Authored-By: alex.s <ajstreed1@gmail.com>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Replaces the pre-commit hook with a dedicated GitHub Actions workflow that runs Mintlify's broken-links checker on PRs and pushes to main when docs/ files are modified. Closes #13978 Co-authored-by: alex.s <alex.s@prefect.io> Co-Authored-By: alex.s <ajstreed1@gmail.com>
Wrap bare curly braces in backticks in docstrings so the generated MDX
does not trip the Mintlify parser (acorn treats them as JSX expressions).
Affected source files:
- prefect_kubernetes/flows.py: {'pod_name': ...} -> `{'pod_name': ...}`
- prefect/server/models/workers.py: {work_queue_id: count} -> `{...}`
Regenerated docs:
- docs/integrations/prefect-kubernetes/api-ref/prefect_kubernetes-flows.mdx
- docs/integrations/prefect-kubernetes/api-ref/prefect_kubernetes-observer.mdx
- docs/v3/api-ref/python/prefect-server-models-workers.mdx
Co-authored-by: alex.s <alex.s@prefect.io>
Co-Authored-By: alex.s <ajstreed1@gmail.com>
- infrastructure-as-code.mdx: add missing https:// to Pulumi URL - deployments.mdx: update ECS guide path to /integrations/prefect-aws/ecs-worker - task-runners.mdx: fix States API ref path to prefect-server-schemas-states - resume-flow-run-on-pr-merge.mdx: fix webhooks path to /v3/concepts/webhooks - version-3-2.mdx: fix malformed markdown PR links (#17240, #17123) - version-3-3.mdx: fix malformed markdown PR links (#17747, #17671) - version-3-4.mdx: fix malformed markdown PR link (#18004) Co-authored-by: alex.s <alex.s@prefect.io> Co-Authored-By: alex.s <ajstreed1@gmail.com>
|
|
||
| - name: Check for broken links | ||
| working-directory: docs | ||
| run: npx mint@latest broken-links |
There was a problem hiding this comment.
Can we use the broken-links command in docs/justfile instead?
There was a problem hiding this comment.
Done — updated to use just links via extractions/setup-just@v3 (same action used in integration-package-release.yaml).
Co-authored-by: alex.s <alex.s@prefect.io> Co-Authored-By: alex.s <ajstreed1@gmail.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 71603ea01d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| <Note> | ||
| This example uses [webhooks](/v3/automate/events/webhooks), which are only available in Prefect Cloud. | ||
| This example uses [webhooks](/v3/concepts/webhooks), which are only available in Prefect Cloud. |
There was a problem hiding this comment.
Fix webhook link in the example source file
This edit updates an auto-generated page (docs/v3/examples/...) but not its source template in examples/resume_flow_run_on_pr_merge.py (which still contains /v3/automate/events/webhooks), so the next docs regeneration will overwrite this line and reintroduce the broken link. To make the fix durable, the source example comment should be updated and the page regenerated.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Good catch — fixed in 990fb67. Updated the source file examples/resume_flow_run_on_pr_merge.py so regeneration won't revert the link fix.
Update the source template so regeneration does not revert the fix. Co-authored-by: alex.s <alex.s@prefect.io> Co-Authored-By: alex.s <ajstreed1@gmail.com>
Adds a dedicated GitHub Actions workflow that runs the existing
just linkscommand fromdocs/justfileto catch broken internal links in docs via Mintlify'sbroken-linksCLI.The workflow:
mainwhendocs/**files are modifiedjust links(usesextractions/setup-just@v3, consistent withintegration-package-release.yaml)workflow_dispatchfor manual runsmarkdown-tests.yaml)The command was already available via
docs/justfile(just links) but was not wired into CI.Also fixes all broken links and MDX parsing errors caught by the checker:
MDX parsing fixes — Bare curly braces in docstrings (e.g.
{'pod_name': 'pod_log_str'}) were interpreted as JSX expressions by the Mintlify MDX parser. Fixed by wrapping them in backticks in the source docstrings and regenerating the affected API ref docs viamdxify.Broken link fixes across 7 files:
infrastructure-as-code.mdx: add missinghttps://to Pulumi URLdeployments.mdx: update ECS guide path (ecs_guide#ecs-worker-guide→ecs-worker)task-runners.mdx: fix States API ref path (prefect-server#prefect.server.schemas.states→prefect-server-schemas-states)resume-flow-run-on-pr-merge.mdx: fix webhooks path (/v3/automate/events/webhooks→/v3/concepts/webhooks)version-3-2.mdx,version-3-3.mdx,version-3-4.mdx: fix malformed markdown PR links (nested[text]([#num](url))→[text](url))Closes #13978
Things for reviewers to consider
mint@latest— consistent with the existingdocs/justfile, but pins to no specific version. A Mintlify breaking change could cause unexpected workflow failures.ecs_guide#ecs-worker-guidewas replaced withecs-workerbased on the current directory structure (docs/integrations/prefect-aws/ecs-worker/index.mdx). Worth verifying this resolves correctly in the deployed docs.prefect_kubernetes-observer.mdx— this is expected frommdxifypicking up upstream source changes; no content was altered.Checklist
<link to issue>"mint.json.Link to Devin session: https://app.devin.ai/sessions/3b47cf2e5966481087098e76606be880
Requested by: @desertaxle