File tree Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -2,9 +2,7 @@ name: Prettier Code Format Check
2
2
3
3
on :
4
4
push :
5
- branches :
6
- - main
7
- - develop
5
+ branches : [main, develop]
8
6
paths :
9
7
- ' **/*.js'
10
8
- ' **/*.ts'
16
14
- ' .prettierrc'
17
15
- ' .prettierignore'
18
16
pull_request :
19
- branches :
20
- - main
21
- - develop
17
+ branches : [main, develop]
22
18
paths :
23
19
- ' **/*.js'
24
20
- ' **/*.ts'
@@ -44,15 +40,15 @@ jobs:
44
40
uses : actions/setup-node@v4.0.3
45
41
with :
46
42
node-version : ' 20'
47
- cache : ' npm '
43
+ cache : ' false ' # no lock file, so disable caching
48
44
49
- - name : 📦 Install Dependencies
50
- run : npm ci
45
+ - name : 📦 Install Prettier
46
+ run : npm install --global prettier
51
47
52
48
- name : 🔍 Run Prettier Check
53
49
id : prettier
54
50
run : |
55
- npx prettier --check . > prettier-report.txt || true
51
+ prettier --check . > prettier-report.txt || true
56
52
57
53
- name : 📊 Upload Prettier Report
58
54
if : failure()
You can’t perform that action at this time.
0 commit comments