Skip to content

Commit ded3e9c

Browse files
committed
[wip] bundle stats
1 parent 5259dc9 commit ded3e9c

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,10 @@ jobs:
6969
# We want to ensure that static exports for all locales do not occur on `pull_request` events
7070
NEXT_PUBLIC_STATIC_EXPORT_LOCALE: ${{ github.event_name == 'push' }}
7171
# See https://github.com/vercel/next.js/pull/81318
72-
TURBOPACK_STATS: 1
72+
TURBOPACK_STATS: ${{ matrix.os == 'ubuntu-latest' }}
7373

7474
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
75+
if: matrix.os == 'ubuntu-latest'
7576
with:
7677
name: webpack-stats
7778
path: apps/site/.next/server/webpack-stats.json

.github/workflows/bundle-compare.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@ jobs:
3333
});
3434
3535
const artifact = artifacts.data.artifacts.find(a => a.name === 'webpack-stats');
36+
37+
if (!artifact) {
38+
throw new Error('No artifact found!');
39+
}
40+
3641
const download = await github.rest.actions.downloadArtifact({
3742
owner: context.repo.owner,
3843
repo: context.repo.repo,
@@ -65,6 +70,11 @@ jobs:
6570
});
6671
6772
const artifact = artifacts.data.artifacts.find(a => a.name === 'webpack-stats');
73+
74+
if (!artifact) {
75+
throw new Error('No artifact found!');
76+
}
77+
6878
const download = await github.rest.actions.downloadArtifact({
6979
owner: context.repo.owner,
7080
repo: context.repo.repo,

0 commit comments

Comments
 (0)