feat: add a production_deploy input to netlify-deploy workflow - #87
Merged
Merged
Conversation
Defaults to the previous expression, so callers are unaffected. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
production_deploy input to netlify-deploy workflow
production_deploy input to netlify-deploy workflowproduction_deploy input to netlify-deploy workflow
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.
Why
The
netlify-deployreusable workflow decides between a production and a draftdeploy from
github.event_name == 'push' && github.ref_name == 'main'. Thatmakes it unusable for a production deploy triggered by any other event — the
motivating case being a
repository_dispatchsent by a Sanity webhook when newcontent is published, to rebuild a statically generated site.
What
Adds an optional
production_deployboolean input, defaulting to the exactexpression used until now, so existing callers keep their current behaviour
(production on a push to
main, draft deploy otherwise).The input drives both the
production-deployoption ofnwtgck/actions-netlifyand the
PRODUCTION_DEPLOYenvironment variable passed to the build script.A caller can now force a production deploy:
Note: the
githubcontext is allowed inon.workflow_call.inputs.<id>.default,and is evaluated against the caller's triggering event, which is what makes the
default work.
🤖 Generated with Claude Code