4
4
pull_request :
5
5
branches :
6
6
- master
7
- paths :
8
- - " website/**/.mdx"
7
+ paths :
8
+ - " website/**/* .mdx"
9
9
10
10
workflow_dispatch :
11
11
inputs :
19
19
- warning
20
20
- debug
21
21
22
- jobs :
23
- validate_document :
24
- runs-on : ubuntu-latest
22
+ jobs :
23
+ validate_document :
24
+ runs-on : ubuntu-latest
25
25
26
- steps :
27
- - name : Checkout repository
28
- uses : actions/checkout@v4
29
- with :
30
- fetch-depth : 0
26
+ steps :
27
+ - name : Checkout repository
28
+ uses : actions/checkout@v4
29
+ with :
30
+ fetch-depth : 0
31
31
32
- - name : Set up Node.js
33
- uses : actions/setup-node@v4
34
- with :
35
- node-version : " 22"
36
- cache : " npm"
37
- cache-dependency-path : website/package-lock.json
32
+ - name : Set up Node.js
33
+ uses : actions/setup-node@v4
34
+ with :
35
+ node-version : " 22"
36
+ cache : " npm"
37
+ cache-dependency-path : website/package-lock.json
38
38
39
- - name : Install dependencies
40
- run : npm install ignore sharp
41
-
42
- - name : Run validate document script
43
- run : |
44
- FILES=$(git diff --name-only origin/${{ github.base_ref }} HEAD | grep '\.mdx$')
45
- echo "Changed document files: $FILES"
46
- if [ -z "$FILES" ]; then
47
- echo "No document files changed."
48
- exit 0
49
- fi
50
-
51
- # Filter out files that no longer exist
52
- EXISTING_FILES=""
53
- for FILE in $FILES; do
54
- if [ -f "$FILE" ]; then
55
- EXISTING_FILES="$EXISTING_FILES $FILE"
56
- else
57
- echo "Warning: File '$FILE' no longer exists and will be skipped."
58
- fi
59
- done
39
+ - name : Install dependencies
40
+ run : npm install ignore sharp
60
41
61
- if [ -z "$EXISTING_FILES" ]; then
62
- echo "No existing markdown files found after filtering."
63
- exit 0
42
+ - name : Run validate document script
43
+ run : |
44
+ FILES=$(git diff --name-only origin/${{ github.base_ref }} HEAD | grep '\.mdx$')
45
+ echo "Changed document files: $FILES"
46
+ if [ -z "$FILES" ]; then
47
+ echo "No document files changed."
48
+ exit 0
49
+ fi
50
+
51
+ # Filter out files that no longer exist
52
+ EXISTING_FILES=""
53
+ for FILE in $FILES; do
54
+ if [ -f "$FILE" ]; then
55
+ EXISTING_FILES="$EXISTING_FILES $FILE"
56
+ else
57
+ echo "Warning: File '$FILE' no longer exists and will be skipped."
64
58
fi
59
+ done
60
+
61
+ if [ -z "$EXISTING_FILES" ]; then
62
+ echo "No existing markdown files found after filtering."
63
+ exit 0
64
+ fi
65
65
66
- node website/validate-document.js $EXISTING_FILES
66
+ node website/validate-document.js $EXISTING_FILES
0 commit comments