@@ -11,18 +11,26 @@ jobs:
11
11
analyze :
12
12
runs-on : ubuntu-latest
13
13
steps :
14
- - uses : actions/checkout@v3
14
+ - uses : actions/checkout@v4
15
15
16
16
- name : Set up node
17
- uses : actions/setup-node@v3
17
+ uses : actions/setup-node@v4
18
18
with :
19
19
node-version : ' 20.x'
20
+ cache : yarn
21
+ cache-dependency-path : yarn.lock
20
22
21
- - name : Install dependencies
22
- uses : bahmutov/npm-install@v1.7.10
23
+ - name : Restore cached node_modules
24
+ uses : actions/cache@v4
25
+ with :
26
+ path : " **/node_modules"
27
+ key : node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
28
+
29
+ - name : Install deps
30
+ run : yarn install --frozen-lockfile
23
31
24
32
- name : Restore next build
25
- uses : actions/cache@v3
33
+ uses : actions/cache@v4
26
34
id : restore-build-cache
27
35
env :
28
36
cache-name : cache-next-build
41
49
run : npx -p nextjs-bundle-analysis@0.5.0 report
42
50
43
51
- name : Upload bundle
44
- uses : actions/upload-artifact@v3
52
+ uses : actions/upload-artifact@v4
45
53
with :
46
54
path : .next/analyze/__bundle_analysis.json
47
55
name : bundle_analysis.json
73
81
run : ls -laR .next/analyze/base && npx -p nextjs-bundle-analysis compare
74
82
75
83
- name : Upload analysis comment
76
- uses : actions/upload-artifact@v3
84
+ uses : actions/upload-artifact@v4
77
85
with :
78
86
name : analysis_comment.txt
79
87
path : .next/analyze/__bundle_analysis_comment.txt
82
90
run : echo ${{ github.event.number }} > ./pr_number
83
91
84
92
- name : Upload PR number
85
- uses : actions/upload-artifact@v3
93
+ uses : actions/upload-artifact@v4
86
94
with :
87
95
name : pr_number
88
96
path : ./pr_number
0 commit comments