Repository navigation
ci: track bundle size on pull requests - #138
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
content-wind had no way to see how a pull request changes the bundle size. This adds the same two workflows as comarkdown/comark-docs, using nuxt-bundle-analyzer.
What changed
bundle-size.yml: on every PR tomain, builds the base commit and the PR side by side withnuxt-bundle-analyzer@0.1.6 --no-serveand uploads each run as an artifact.bundle-size-comment.yml: identical to comark-docs. It runs onworkflow_runfrommainwith a write token (so fork PRs work too), uploads both runs to bundle.nuxt.dev and posts or updates one comment on the PR.Compared with comark-docs,
bundle-size.ymlanalyzes the repo root (there is noplayground/), inlines the setup (Node 24, corepack for the pinned pnpm,pnpm install --frozen-lockfile) since there is no.github/actions/setup, and drops theGITHUB_TOKENand 8 GB heap that comark's content snapshot needed.Evidence
Ran locally in an orb (Node 26), not yet on GitHub:
commenton that run used as both base and pr (--outputinstead of--post):actionlintreports no issues on either file.Details
workflow_runfrom the default branch, so this PR will runbundle-sizebut get no comment. The first comment appears on PRs opened after this is merged.continue-on-errorand the comment is posted without the comparison link.ELI5
Every pull request now builds the site twice, once before and once after the change, and a bot comments with how much bigger or smaller the site got.