@@ -11,18 +11,26 @@ jobs:
1111  analyze :
1212    runs-on : ubuntu-latest 
1313    steps :
14-       - uses : actions/checkout@v3  
14+       - uses : actions/checkout@v4  
1515
1616      - name : Set up node 
17-         uses : actions/setup-node@v3  
17+         uses : actions/setup-node@v4  
1818        with :
1919          node-version : ' 20.x' 
20+           cache : yarn 
21+           cache-dependency-path : yarn.lock 
2022
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 
2331
2432      - name : Restore next build 
25-         uses : actions/cache@v3  
33+         uses : actions/cache@v4  
2634        id : restore-build-cache 
2735        env :
2836          cache-name : cache-next-build 
4149        run : npx -p nextjs-bundle-analysis@0.5.0 report 
4250
4351      - name : Upload bundle 
44-         uses : actions/upload-artifact@v3  
52+         uses : actions/upload-artifact@v4  
4553        with :
4654          path : .next/analyze/__bundle_analysis.json 
4755          name : bundle_analysis.json 
7381        run : ls -laR .next/analyze/base && npx -p nextjs-bundle-analysis compare 
7482
7583      - name : Upload analysis comment 
76-         uses : actions/upload-artifact@v3  
84+         uses : actions/upload-artifact@v4  
7785        with :
7886          name : analysis_comment.txt 
7987          path : .next/analyze/__bundle_analysis_comment.txt 
8290        run : echo ${{ github.event.number }} > ./pr_number 
8391
8492      - name : Upload PR number 
85-         uses : actions/upload-artifact@v3  
93+         uses : actions/upload-artifact@v4  
8694        with :
8795          name : pr_number 
8896          path : ./pr_number 
0 commit comments