Skip to content

Docs: Auto-generated documentation update #1307

Docs: Auto-generated documentation update

Docs: Auto-generated documentation update #1307

Workflow file for this run

name: Vale Linting
permissions: {}
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
vale:
name: Run Vale
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
checks: write
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: '24'
- name: Install dependencies
run: |
corepack enable
corepack install
pnpm install
- name: Setup PATH for mdx2vast
run: echo "PATH=${{ github.workspace }}/node_modules/.bin:$PATH" >> $GITHUB_ENV
- name: Get changed files
id: changed-files
run: |
# Ensure we have the base ref so git diff can run (fixes empty file list on PRs)
git fetch origin ${{ github.event.pull_request.base.ref }}
# Get changed markdown files, excluding specific directories and files
git diff --name-only --diff-filter=ACMR \
${{ github.event.pull_request.base.sha }} ${{ github.sha }} \
| grep -E '\.(mdx|md)$' \
| grep -v '^snippets/' \
| grep -v '^errors/' \
| grep -v '^\.skills/' \
| grep -v '^agent/cli-api.mdx$' \
| grep -v '^agent/cli.mdx$' \
| grep -v '^style-guide.mdx$' \
> changed_files.txt || true
if [ -s changed_files.txt ]; then
# Build JSON array of files for vale-action's files input
echo "files=$(jq -R -s -c 'split("\n") | map(select(length > 0))' changed_files.txt)" >> $GITHUB_OUTPUT
echo "has_files=true" >> $GITHUB_OUTPUT
else
echo "has_files=false" >> $GITHUB_OUTPUT
fi
- name: Run Vale
if: steps.changed-files.outputs.has_files == 'true'
uses: vale-cli/vale-action@v2.1.1
with:
files: ${{ steps.changed-files.outputs.files }}
reporter: github-pr-review
# Report all issues in changed files, not only newly added lines.
# Vale line numbers can differ from diff positions after MDX parsing.
filter_mode: nofilter
fail_on_error: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}