Skip to content

ci(docs): add docs.page link check to docs workflow - #9214

Open
mikehardy wants to merge 2 commits into
mainfrom
docs-page-link-check-ci
Open

ci(docs): add docs.page link check to docs workflow#9214
mikehardy wants to merge 2 commits into
mainfrom
docs-page-link-check-ci

Conversation

@mikehardy

Copy link
Copy Markdown
Collaborator

Summary

Integrates @docs.page/cli check into RNFB docs validation so broken internal links, missing assets, MDX render issues, and metadata problems fail CI — closing the gap left after the June 2026 link-audit sweep (PR #9051), which fixed URLs but never wired the checker into lint/CI.

Two bisectable commits:

  1. docs sweep — fix broken TypeDoc/reference URLs and metadata (migrating-to-v26.mdx em dash) so the checker is green before enforcement lands
  2. CI integrationyarn lint:docs-links, @docs.page/cli@2.0.0 devDep, .github/workflows/docs.yml step, OKF agent guidance

External links: why --external-links warn only

docs check defaults every category to error. The yarn script is docs check . --external-links warn — the only override. npmjs.com, Stack Overflow, and similar hosts often return 403 Forbidden to GitHub Actions / automated link checkers even when the URL works in a browser. Treating those as errors would fail CI on false positives.

Agents still must fix every error line. OKF documents the sole acceptable non-fix: external warn from bot/WAF blocking (validation-checklist § docs.page link check). Real broken links at error severity must be fixed in normal change authoring.

Test plan

  • yarn lint:markdown exit 0
  • yarn lint:spellcheck exit 0
  • yarn lint:docs-links exit 0 (0 errors; external 403s warn-only)
  • Documentation workflow green on CI

Maintainer note: Fixes CPRN-368

@codecov

codecov Bot commented Aug 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.39%. Comparing base (4ef21d0) to head (f015cec).

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #9214      +/-   ##
============================================
+ Coverage     68.36%   68.39%   +0.03%     
- Complexity     1914     1915       +1     
============================================
  Files           516      516              
  Lines         37853    37853              
  Branches       5183     5183              
============================================
+ Hits          25875    25886      +11     
+ Misses        10187    10179       -8     
+ Partials       1791     1788       -3     
Flag Coverage Δ
android-native 63.76% <ø> (+0.01%) ⬆️
e2e-ts-android 54.10% <ø> (ø)
e2e-ts-ios 53.51% <ø> (ø)
e2e-ts-macos 49.67% <ø> (-<0.01%) ⬇️
ios-native 68.79% <ø> (+0.10%) ⬆️
ios-ruby 100.00% <ø> (ø)
jest 45.48% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@russellwheatley russellwheatley left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two things before merge. The AuthSettings fragment drop is a real docs regression. The TypeDoc host gap is bigger: with the current CLI, this job will not fail on a broken reference.rnfirebase.io URL after merge.

Comment thread docs/auth/phone-auth.mdx
Ensure that all parts of step 1 and 2 from [the official firebase Android phone auth docs](https://firebase.google.com/docs/auth/android/phone-auth#enable-phone-number-sign-in-for-your-firebase-project) have been followed.

To bypass Play Integrity for manual testing, you may [force reCAPTCHA to be used](https://reference.rnfirebase.io/_react-native-firebase/auth/FirebaseAuthTypes/AuthSettings.html#appVerificationDisabledForTesting) prior to calling [`verifyPhoneNumber`](https://reference.rnfirebase.io/_react-native-firebase/auth/verifyPhoneNumber.html).
To bypass Play Integrity for manual testing, you may [force reCAPTCHA to be used](https://reference.rnfirebase.io/_react-native-firebase/auth/AuthSettings.html) prior to calling [`verifyPhoneNumber`](https://reference.rnfirebase.io/_react-native-firebase/auth/verifyPhoneNumber.html).

@russellwheatley russellwheatley Aug 24, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The iOS AuthSettings link a few lines up still deep-links to #appverificationdisabledfortesting. This Android one dropped the fragment, so it lands on the interface page instead of the property. Restore the same hash.

Comment thread package.json
"lint:ios:check": "find packages/*/ios -type f \\( -name '*.h' -o -name '*.cpp' -o -name '*.m' -o -name '*.mm' \\) -not -path '*/generated/*' -print0 | xargs -0 clang-format --style=Google -n -Werror",
"lint:ios:fix": "find packages/*/ios -type f \\( -name '*.h' -o -name '*.cpp' -o -name '*.m' -o -name '*.mm' \\) -not -path '*/generated/*' -print0 | xargs -0 clang-format -i --style=Google",
"lint:markdown": "eslint \"docs/**/*.mdx\" --max-warnings=0 && prettier --check \"docs/**/*.mdx\"",
"lint:docs-links": "docs check . --external-links warn",

@russellwheatley russellwheatley Aug 24, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--external-links warn is the right call for npm/SO 403s. @docs.page/cli treats every https:// URL as external (classifyTarget), and there is no per-host severity. That means a 404 on reference.rnfirebase.io will only warn, which is almost every TypeDoc link this sweep rewrote.

Internal /auth/usage paths, assets, MDX, and frontmatter will still fail the job. TypeDoc URL rot will not.

If the point of wiring this in is to keep those reference links honest, this needs a companion check that fails on that host, or a CLI feature for host-specific severity. As written, the sweep helps today's clicks and then CI stops watching.

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