Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MEI-23]: Broken links checker #2507

Merged
merged 10 commits into from
Aug 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/actions/validate-docs-links/README.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# GitHub Action for Validating Documentation Links
curquiza marked this conversation as resolved.
Show resolved Hide resolved

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.
41 changes: 41 additions & 0 deletions .github/actions/validate-docs-links/lib/index.js

Large diffs are not rendered by default.

2,376 changes: 2,376 additions & 0 deletions .github/actions/validate-docs-links/lib/licenses.txt

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions .github/actions/validate-docs-links/lib/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"type": "module"
}
29 changes: 29 additions & 0 deletions .github/actions/validate-docs-links/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"private": true,
"type": "module",
"exports": "./lib/index.js",
"files": [
"src"
],
"scripts": {
"build": "npm run types && ncc -m -o ./lib build src/index.ts --license licenses.txt",
"types": "tsc"
},
"devDependencies": {
"@types/github-slugger": "^1.3.0",
"@vercel/ncc": "0.34.0"
},
"dependencies": {
"@actions/core": "^1.10.0",
"@actions/github": "^5.1.1",
"@types/node": "^20.4.1",
"github-slugger": "1.2.0",
"gray-matter": "4.0.2",
"rehype-raw": "4.0.1",
"remark-parse": "7.0.1",
"remark-rehype": "5.0.0",
"typescript": "^5.1.6",
"unified": "8.4.1",
"unist-util-visit": "2.0.0"
}
}
Loading