Skip to content

Commit 6e65f8e

Browse files
authored
Update and rename nextjs_bundle_analysis.yml to bundle_analysis.yml
1 parent 4660d37 commit 6e65f8e

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

.github/workflows/nextjs_bundle_analysis.yml renamed to .github/workflows/bundle_analysis.yml

+8-7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: 'Next.js Bundle Analysis'
1+
name: 'Bundle Analysis'
22

33
on:
44
pull_request:
@@ -36,9 +36,6 @@ jobs:
3636
yarn install --frozen-lockfile 2>&1 | grep -v '^[warning|info]'
3737
yarn build:lib
3838
39-
- name: Change dir to next app
40-
run: cd examples/bundle-test
41-
4239
- name: Restore next build
4340
uses: actions/cache@v2
4441
id: restore-build-cache
@@ -47,32 +44,34 @@ jobs:
4744
with:
4845
# if you use a custom build directory, replace all instances of `.next` in this file with your build directory
4946
# ex: if your app builds to `dist`, replace `.next` with `dist`
50-
path: .next/cache
47+
path: ./examples/bundle-test/.next/cache
5148
# change this if you prefer a more strict cache
5249
key: ${{ runner.os }}-build-${{ env.cache-name }}
5350

5451
- name: Build next.js app
52+
working-directory: ./examples/bundle-test
5553
# change this if your site requires a custom build command
5654
run: yarn build
5755

5856
# Here's the first place where next-bundle-analysis' own script is used
5957
# This step pulls the raw bundle stats for the current bundle
6058
- name: Analyze bundle
59+
working-directory: ./examples/bundle-test
6160
run: npx -p nextjs-bundle-analysis report
6261

6362
- name: Upload bundle
6463
uses: actions/upload-artifact@v2
6564
with:
6665
name: bundle
67-
path: .next/analyze/__bundle_analysis.json
66+
path: ./examples/bundle-test/.next/analyze/__bundle_analysis.json
6867

6968
- name: Download base branch bundle stats
7069
uses: dawidd6/action-download-artifact@v2
7170
if: success() && github.event.number
7271
with:
7372
workflow: nextjs_bundle_analysis.yml
7473
branch: ${{ github.event.pull_request.base.ref }}
75-
path: .next/analyze/base
74+
path: ./examples/bundle-test/.next/analyze/base
7675

7776
# And here's the second place - this runs after we have both the current and
7877
# base branch bundle stats, and will compare them to determine what changed.
@@ -88,10 +87,12 @@ jobs:
8887
# Either of these arguments can be changed or removed by editing the `nextBundleAnalysis`
8988
# entry in your package.json file.
9089
- name: Compare with base branch bundle
90+
working-directory: ./examples/bundle-test
9191
if: success() && github.event.number
9292
run: ls -laR .next/analyze/base && npx -p nextjs-bundle-analysis compare
9393

9494
- name: Get comment body
95+
working-directory: ./examples/bundle-test
9596
id: get-comment-body
9697
if: success() && github.event.number
9798
run: |

0 commit comments

Comments
 (0)