File tree Expand file tree Collapse file tree 1 file changed +19
-4
lines changed Expand file tree Collapse file tree 1 file changed +19
-4
lines changed Original file line number Diff line number Diff line change @@ -3,8 +3,8 @@ name: Prettier
3
3
4
4
on :
5
5
push :
6
- # pull_request:
7
- # branches: [master, main]
6
+ pull_request :
7
+ branches : [master, main]
8
8
9
9
jobs :
10
10
prettier :
16
16
with :
17
17
ref : ${{ github.head_ref }}
18
18
19
+ - name : Cache Node Modules
20
+ uses : actions/cache@v3
21
+ id : node_modules_cache_id
22
+ with :
23
+ path : " **/node_modules"
24
+ key : ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
25
+
26
+ - name : Install Node Mudules
27
+ if : steps.node_modules_cache_id.outputs.cache-hit != 'true'
28
+ run : npm ci
29
+ shell : bash
30
+
19
31
- name : Run Prettier
20
- uses : creyD/prettier_action@v4.2
32
+ run : npx prettier --write .
33
+
34
+ - name : Commit
35
+ uses : stefanzweifel/git-auto-commit-action@v4
21
36
with :
22
- prettier_options : --write .
37
+ commit_message : Formatted!
You can’t perform that action at this time.
0 commit comments