Skip to content

Commit 05b725a

Browse files
authored
(fix) Adding Markdown link checker to docs (#14832)
1 parent b973d29 commit 05b725a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+4944
-22982
lines changed

.github/workflows/docs-pr.yaml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Validate MDX Links
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- 'docs-v2/pages/**/*.mdx'
7+
push:
8+
branches:
9+
- main
10+
paths:
11+
- 'docs-v2/pages/**/*.mdx'
12+
13+
jobs:
14+
validate-links:
15+
runs-on: ubuntu-latest
16+
defaults:
17+
run:
18+
working-directory: docs-v2
19+
20+
steps:
21+
- name: Checkout Code
22+
uses: actions/[email protected]
23+
with:
24+
# Fetch full history for checking diffs
25+
fetch-depth: 0
26+
27+
- uses: pnpm/[email protected]
28+
with:
29+
version: 9.14.2
30+
31+
- name: Get pnpm store directory
32+
id: pnpm-cache
33+
run: |
34+
echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT
35+
36+
- uses: actions/cache@v4
37+
name: Setup pnpm cache
38+
with:
39+
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
40+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
41+
restore-keys: |
42+
${{ runner.os }}-pnpm-store-
43+
44+
- name: Setup Node Env
45+
uses: actions/[email protected]
46+
with:
47+
node-version: 18
48+
registry-url: https://registry.npmjs.org/
49+
cache: 'pnpm'
50+
51+
- name: Install dependencies
52+
run: pnpm install -r
53+
54+
- name: Run link validator
55+
run: node validate-mdx-links.mjs
56+
env:
57+
DEBUG: ${{ vars.DEBUG }}

0 commit comments

Comments
 (0)