Skip to content
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
57 changes: 57 additions & 0 deletions .github/workflows/docs-pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Validate MDX Links

on:
pull_request:
paths:
- 'docs-v2/pages/**/*.mdx'
push:
branches:
- main
paths:
- 'docs-v2/pages/**/*.mdx'

jobs:
validate-links:
runs-on: ubuntu-latest
defaults:
run:
working-directory: docs-v2

steps:
- name: Checkout Code
uses: actions/[email protected]
with:
# Fetch full history for checking diffs
fetch-depth: 0

- uses: pnpm/[email protected]
with:
version: 9.14.2

- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT

- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Setup Node Env
uses: actions/[email protected]
with:
node-version: 18
registry-url: https://registry.npmjs.org/
cache: 'pnpm'

- name: Install dependencies
run: pnpm install -r

- name: Run link validator
run: node validate-mdx-links.mjs
env:
DEBUG: ${{ vars.DEBUG }}
Loading
Loading