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

(ci): Docs link checker. #8958

Merged
merged 57 commits into from
Aug 7, 2024
Merged
Show file tree
Hide file tree
Changes from 40 commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
f2b501f
(ci): Docs link checker.
anthonyshew Aug 7, 2024
c6f1986
Just run it.
anthonyshew Aug 7, 2024
9c81d3c
Fix command.
anthonyshew Aug 7, 2024
31119d5
Log where at.
anthonyshew Aug 7, 2024
4712d0f
here?
anthonyshew Aug 7, 2024
023afc4
heh
anthonyshew Aug 7, 2024
7620bca
One more?
anthonyshew Aug 7, 2024
7f70a7a
how about
anthonyshew Aug 7, 2024
5ab9983
Here?
anthonyshew Aug 7, 2024
3192741
Make link look right.
anthonyshew Aug 7, 2024
c0fb7d6
Fixed!
anthonyshew Aug 7, 2024
9e5e287
Test.
anthonyshew Aug 7, 2024
2426b05
fail?
anthonyshew Aug 7, 2024
f75f1aa
?
anthonyshew Aug 7, 2024
9e15fb2
Fix path leaders?
anthonyshew Aug 7, 2024
4137a6b
eh?
anthonyshew Aug 7, 2024
49cbf55
eh?
anthonyshew Aug 7, 2024
2e428e1
the
anthonyshew Aug 7, 2024
c0bff44
commits
anthonyshew Aug 7, 2024
00b6ea3
will
anthonyshew Aug 7, 2024
5f1a95f
continue
anthonyshew Aug 7, 2024
d13d082
logging
anthonyshew Aug 7, 2024
78b7fd0
Mabye?
anthonyshew Aug 7, 2024
e77667d
hmm
anthonyshew Aug 7, 2024
8392508
agane
anthonyshew Aug 7, 2024
676d58f
nah
anthonyshew Aug 7, 2024
809fc1e
more
anthonyshew Aug 7, 2024
eb5ca88
huh
anthonyshew Aug 7, 2024
7fbb6a6
Maybe?
anthonyshew Aug 7, 2024
9a15913
eh?
anthonyshew Aug 7, 2024
5f1fb16
er
anthonyshew Aug 7, 2024
ea03c44
yuh
anthonyshew Aug 7, 2024
9ae884d
I did it?
anthonyshew Aug 7, 2024
a378b7d
Nice.
anthonyshew Aug 7, 2024
eecadf3
Fix lockfile?
anthonyshew Aug 7, 2024
8095c9d
Merge branch 'main' of https://github.com/vercel/turbo into shew-87217
anthonyshew Aug 7, 2024
94895ad
No sweep
anthonyshew Aug 7, 2024
7e55161
nah
anthonyshew Aug 7, 2024
f8d2314
fix lock
anthonyshew Aug 7, 2024
5e2b62b
Fix up tsconfig.
anthonyshew Aug 7, 2024
ecf50c5
fixes
anthonyshew Aug 7, 2024
5971a55
fixes
anthonyshew Aug 7, 2024
f83ddde
fixes
anthonyshew Aug 7, 2024
0ad9cab
fixes
anthonyshew Aug 7, 2024
28c7545
fixes
anthonyshew Aug 7, 2024
880fe69
fixes
anthonyshew Aug 7, 2024
1cdae3a
Very close.
anthonyshew Aug 7, 2024
8427291
code clarity
anthonyshew Aug 7, 2024
a34d064
All green?!
anthonyshew Aug 7, 2024
e78b7fe
Fix README.
anthonyshew Aug 7, 2024
77960cc
heh?
anthonyshew Aug 7, 2024
6a58c35
remove
anthonyshew Aug 7, 2024
f78d8b6
Make sure.
anthonyshew Aug 7, 2024
fa36aaf
even more sure
anthonyshew Aug 7, 2024
eb01784
huh
anthonyshew Aug 7, 2024
ea22697
testing
anthonyshew Aug 7, 2024
f0866a8
Cleanup, leggo.
anthonyshew Aug 7, 2024
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
25 changes: 25 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Docs checks

on:
pull_request:
paths:
- "docs/**"
- ".github/actions/validate-docs-links/**"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
validate-docs-links:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: "Setup Node"
uses: ./.github/actions/setup-node

- name: "Run link checker"
run: cd docs && pnpm run check-links
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9 changes: 9 additions & 0 deletions docs/README.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# 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

pnpm check-links
28 changes: 28 additions & 0 deletions docs/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"private": true,
"type": "module",
"exports": "./dist/index.js",
"files": [
"src"
],
"scripts": {
"check-links": "tsx validate-docs-links.ts"
},
"devDependencies": {
"@types/github-slugger": "^1.3.0",
"@vercel/ncc": "0.34.0",
"tsx": "^4.7.2",
"typescript": "5.1.6"
},
"dependencies": {
"@actions/core": "^1.10.0",
"@actions/github": "^5.1.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",
"unified": "8.4.1",
"unist-util-visit": "2.0.0"
}
}
2 changes: 1 addition & 1 deletion docs/repo-docs/crafting-your-repository/caching.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Turborepo uses caching to speed up builds, ensuring you **never do the same work

![12 tasks are being ran in 3 packages, resulting in a ">>> FULL TURBO" cache hit. The total time it takes to restore these tasks from cache is 80 milliseconds.](/images/docs/why-turborepo-solution.png)

Turborepo's caching results in significant time savings when working locally - and is even more powerful when [Remote Caching](/repo/docs/core-concepts/remote-caching) is enabled, sharing a cache among your entire team and CI.
Turborepo's caching results in significant time savings when working locally - and is even more powerful when [Remote Caching](/repo/d/core-concepts/remote-caching) is enabled, sharing a cache among your entire team and CI.

On this page, you'll learn:

Expand Down
11 changes: 11 additions & 0 deletions docs/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"compilerOptions": {
"noEmit": true,
"target": "esnext",
"moduleResolution": "node",
"strict": true,
"noImplicitAny": true,
"allowSyntheticDefaultImports": true
},
"include": ["validate-docs-links.ts", "types.d.ts"]
}
2 changes: 2 additions & 0 deletions docs/types.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
declare module "remark-rehype";
declare module "rehype-raw";
Loading
Loading