Skip to content

docs: fix Netlify ignore command skipping builds#3424

Open
Genteure wants to merge 1 commit into
zmkfirmware:mainfrom
Genteure:docs/fix-netlify-build-ignore
Open

docs: fix Netlify ignore command skipping builds#3424
Genteure wants to merge 1 commit into
zmkfirmware:mainfrom
Genteure:docs/fix-netlify-build-ignore

Conversation

@Genteure

@Genteure Genteure commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

When CACHED_COMMIT_REF == COMMIT_REF, git diff --quiet finds no changes and exits 0, causing Netlify to skip the build. Guard against this by exiting 1 (proceed with build) when the two refs are identical.

From https://docs.netlify.com/build/configure-builds/environment-variables/#git-metadata

CACHED_COMMIT_REF: reference ID (also known as “SHA” or “hash”) of the last commit that we built before the current build. When a build runs without cache, CACHED_COMMIT_REF will be the same as the COMMIT_REF.

I don't have a netlify account so it's all reading and guessing with no testing.

PR check-list

N/A

When CACHED_COMMIT_REF == COMMIT_REF (cache miss or rebuild of same
commit), `git diff --quiet` finds no changes and exits 0, causing
Netlify to skip the build. Guard against this by exiting 1
(proceed with build) when the two refs are identical.
@Genteure
Genteure requested a review from a team as a code owner July 18, 2026 07:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant