Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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 "::set-output name=pnpm_cache_dir::$(pnpm store path)"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Update deprecated GitHub Actions command

The set-output command is deprecated. Please update to the new syntax.

- echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
+ echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT
🧰 Tools
🪛 actionlint (1.7.4)

33-33: workflow command "set-output" was deprecated. use echo "{name}={value}" >> $GITHUB_OUTPUT instead: https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions

(deprecated-commands)

- 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