rsnext/.github/actions/validate-docs-links
Steven 48375e492b
chore(ci): fix validate-docs-links for non-PR (#53129)
This PR fixes an issue when `validate-docs-links` is run on a branch
like `canary` instead of a branch from a PR.

Example error message:


https://github.com/vercel/next.js/actions/runs/5649063425/job/15302604957
2023-07-24 14:34:45 -07:00
..
lib chore(ci): fix validate-docs-links for non-PR (#53129) 2023-07-24 14:34:45 -07:00
src chore(ci): fix validate-docs-links for non-PR (#53129) 2023-07-24 14:34:45 -07:00
package.json chore(ci): add pnpm workspace for github actions (#52976) 2023-07-21 14:29:31 +00:00
README.MD Revert "[Docs] Fix validator action breaking when PRs originate from … (#51674) 2023-06-22 19:50:14 +00:00
tsconfig.json Migrate validate links script from next-site and setup GitHub action (#51365) 2023-06-20 13:19:06 +00:00
types.d.ts Migrate validate links script from next-site and setup GitHub action (#51365) 2023-06-20 13:19:06 +00:00

GitHub Action for Validating Documentation Links

This action ensures that internal links in .mdx files in the /docs/ directory are valid. It runs on every pull request that includes changes to these files.

The action is triggered by the workflow defined in .github/workflows/validate-docs-links.yml.

Usage

This action is written in TypeScript and compiled locally before being pushed to GitHub.

To make changes:

  • Edit the src/index.ts file.
  • Navigate to the script folder cd .github/actions/validate-docs-links
  • Run npm install to install dependencies.
  • Run npm run build to compile code. This will create an updated lib/index.js.
  • Commit and push changes to GitHub.