Skip to content

Commit f8da8ed

Browse files
authored
Update checkspelling.yml
1 parent 75c9b31 commit f8da8ed

1 file changed

Lines changed: 11 additions & 6 deletions

File tree

.github/workflows/checkspelling.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# .github/workflows/grammar.yml
21
name: Grammar Check (PR Changes Only)
32

43
on:
@@ -7,6 +6,7 @@ on:
76
jobs:
87
grammar:
98
runs-on: ubuntu-latest
9+
1010
steps:
1111
- uses: actions/checkout@v3
1212

@@ -18,23 +18,28 @@ jobs:
1818
**/*.md
1919
**/*.mdx
2020
21-
- name: Skip if no docs changed
21+
- name: Skip if no .md/.mdx files changed
2222
if: steps.changed.outputs.any_changed != 'true'
23-
run: echo "No .md or .mdx files changed."
23+
run: echo "No markdown or MDX files changed."
2424

2525
- name: Set up Node
2626
if: steps.changed.outputs.any_changed == 'true'
2727
uses: actions/setup-node@v3
2828
with:
2929
node-version: 18
3030

31-
- name: Install MDX cleaner
31+
- name: Install MDX cleaner dependencies
32+
if: steps.changed.outputs.any_changed == 'true'
33+
run: npm install remark remark-mdx strip-markdown
34+
35+
- name: Extract prose from changed docs
3236
if: steps.changed.outputs.any_changed == 'true'
3337
run: |
34-
npm install remark remark-mdx strip-markdown
3538
mkdir -p dist
3639
for file in ${{ steps.changed.outputs.all_changed_files }}; do
37-
node scripts/clean-mdx.js "$file" > "dist/${file//\//_}.txt"
40+
if [[ "$file" == *.md || "$file" == *.mdx ]]; then
41+
node .github/scripts/clean-mdx.js "$file" > "dist/${file//\//_}.txt"
42+
fi
3843
done
3944
4045
- name: Download LanguageTool CLI

0 commit comments

Comments
 (0)