Skip to content

Commit 01cf3f9

Browse files
committed
Update ci.yml
1 parent fadf006 commit 01cf3f9

1 file changed

Lines changed: 16 additions & 12 deletions

File tree

.github/workflows/ci.yml

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,19 @@ jobs:
102102
if: steps.changed-files.outputs.any_changed != 'true'
103103
run: echo "No matching changed files; Prettier check skipped."
104104

105+
# Vale checks spelling/style on changed .md/.mdx files and fails on real Vale errors,
106+
# matching what runs locally (scripts/docs-pre-commit-check.sh) so "passes locally"
107+
# means "passes on CI". The matrix keeps the required check names "Spelling (.md)" and
108+
# "Spelling (.mdx)". Vale runs directly (not via the reviewdog-based composite action)
109+
# so large PRs do not hit GitHub's 300-file diff limit, which is an infrastructure
110+
# failure unrelated to content.
105111
spelling:
106112
name: Spelling
107113
runs-on: ubuntu-latest
114+
strategy:
115+
fail-fast: false
116+
matrix:
117+
file-extensions: ['.md', '.mdx']
108118
steps:
109119
- uses: actions/checkout@v6
110120
with:
@@ -119,21 +129,15 @@ jobs:
119129
uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 # 47.0.5; pin matches docs-spelling-check
120130
with:
121131
path: .
122-
files: |
123-
**/*.md
124-
**/*.mdx
132+
files: '**/*${{ matrix.file-extensions }}'
125133
separator: ','
126-
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
127-
with:
128-
python-version: '3.12'
129-
# Run Vale directly (no reviewdog). Large PRs exceed GitHub's 300-file diff limit,
130-
# which breaks github-pr-check; reporter: local still invokes reviewdog and fails
131-
# with "diff command is empty" when filter-mode is added.
132134
- name: Install Vale
133135
if: steps.changed-files.outputs.any_changed == 'true'
134136
run: |
135-
curl -sfL https://install.vale.sh | sh -s -- -b /usr/local/bin
136-
cd .github-actions/docs-spelling-check && vale sync
137+
mkdir -p "$HOME/.local/bin"
138+
curl -sfL https://install.vale.sh | sh -s -- -b "$HOME/.local/bin"
139+
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
140+
(cd .github-actions/docs-spelling-check && "$HOME/.local/bin/vale" sync)
137141
- name: Run Vale
138142
if: steps.changed-files.outputs.any_changed == 'true'
139143
env:
@@ -149,7 +153,7 @@ jobs:
149153
[ -f "$f" ] && files+=("$f")
150154
done
151155
if [ ${#files[@]} -eq 0 ]; then
152-
echo "No existing files to check (skipping)."
156+
echo "No existing ${{ matrix.file-extensions }} files to check."
153157
exit 0
154158
fi
155159
vale --config .github-actions/docs-spelling-check/.vale.ini "${files[@]}"

0 commit comments

Comments
 (0)