Skip unnecessary rebuilds when no dependencies changed#100
Merged
Conversation
Add a check step to the rebuild workflow that compares the last commit touching dependency files against the last dist build commit. If no dependency files changed since the last rebuild, all subsequent steps are skipped, avoiding unnecessary install and build cycles.
4ab17ed to
fecd045
Compare
prvn
approved these changes
Feb 10, 2026
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.
The weekly rebuild workflow runs install and build even when no dependencies have changed. While the build output for this repo is deterministic, the unnecessary install+build cycle wastes CI time.
This adds an early git-based check that compares the last commit touching dependency files (package.json, package-lock.json) against the last commit touching the dist directory. If no dependency files changed since the last rebuild, the install, build, commit, and PR steps are all skipped.
The check runs before
npm ci, so it adds ~1s of git commands instead of the full install+build cycle when unnecessary. Manual triggering viaworkflow_dispatchstill works normally.