File tree Expand file tree Collapse file tree 1 file changed +32
-15
lines changed Expand file tree Collapse file tree 1 file changed +32
-15
lines changed Original file line number Diff line number Diff line change @@ -34,24 +34,41 @@ jobs:
34
34
name : Lint markdown content
35
35
runs-on : ubuntu-latest
36
36
steps :
37
- - name : Checkout Source code
38
- uses : actions/checkout@v4
37
+ - name : Checkout Source code
38
+ uses : actions/checkout@v4
39
39
40
- - name : Use Node.js 18
41
- uses : actions/setup-node@v4
42
- with :
43
- node-version : 18
44
- cache : ' npm '
45
- cache-dependency-path : ' package-lock.json '
46
- registry-url : ' https://npm.pkg.github.com/ '
47
- scope : ' @apify-packages '
40
+ - name : Get changed files
41
+ id : changed-files
42
+ uses : tj-actions/[email protected]
43
+ with :
44
+ files : |
45
+ **/*.md
46
+ **/*.mdx
47
+ separator : " , "
48
48
49
- - name : Install Dependencies
50
- run : npm ci --force
51
- env :
52
- NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
49
+ - name : Use Node.js 18
50
+ uses : actions/setup-node@v4
51
+ with :
52
+ node-version : 18
53
+ cache : ' npm'
54
+ cache-dependency-path : ' package-lock.json'
55
+ registry-url : ' https://npm.pkg.github.com/'
56
+ scope : ' @apify-packages'
57
+
58
+ - name : Install Dependencies
59
+ run : npm ci --force
60
+ env :
61
+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
62
+
63
+ - name : List and Lint Changed Markdown Files
64
+ env :
65
+ ALL_CHANGED_FILES : ${{ steps.changed-files.outputs.all_changed_files }}
66
+ run : |
67
+ IFS=',' read -ra FILE_ARRAY <<< "$ALL_CHANGED_FILES"
68
+ for file in "${FILE_ARRAY[@]}"; do
69
+ npx markdownlint "$file"
70
+ done
53
71
54
- - run : npm run lint:md
55
72
56
73
lint_code :
57
74
name : Lint app code
You can’t perform that action at this time.
0 commit comments