Repository navigation
ci: verify the production build on pull requests - #730
Merged
Merged
Conversation
Add a Production Build job to the CI workflow that runs next build with a cached .next/cache and writes the build output size to the job summary. Configure the bundle analyzer with options before applying it to the Next.js config, which is what broke next build.
|
@Vox-d-glitch is attempting to deploy a commit to the zintarh Team on Vercel. A member of the Team first needs to authorize it. |
|
@Vox-d-glitch Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I added a "Production Build" job to the CI workflow that runs
pnpm buildon every pull request as its own status check, so it can be marked as required and a change that breaksnext buildfails CI before merging. It restores and saves.next/cachewithactions/cache, keyed on the lockfile and source files, falling back to the latest cache for the same lockfile. After the build it writes the client JavaScript, CSS, static and server output totals to the job summary, leaving the per-bundle breakdown to the existing bundle-size workflow.I also corrected the bundle analyzer configuration from #375 so it is called with options before wrapping the config:
withBundleAnalyzer({ enabled: process.env.ANALYZE === "true" })(nextConfig).Once this is merged, "Production Build" needs to be added as a required status check in the branch protection settings for
main.Closes #579