Skip to content

feat: add a production_deploy input to netlify-deploy workflow - #87

Merged
browniebroke merged 1 commit into
mainfrom
feat/netlify-production-deploy-input
Sep 13, 2026
Merged

browniebroke merged 1 commit into
mainfrom
feat/netlify-production-deploy-input

Conversation

@browniebroke

Copy link
Copy Markdown
Owner

Why

The netlify-deploy reusable workflow decides between a production and a draft
deploy from github.event_name == 'push' && github.ref_name == 'main'. That
makes it unusable for a production deploy triggered by any other event — the
motivating case being a repository_dispatch sent by a Sanity webhook when new
content is published, to rebuild a statically generated site.

What

Adds an optional production_deploy boolean input, defaulting to the exact
expression 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-deploy option of nwtgck/actions-netlify
and the PRODUCTION_DEPLOY environment variable passed to the build script.

A caller can now force a production deploy:

jobs:
  deploy:
    uses: browniebroke/github-actions/.github/workflows/netlify-deploy.yml@v1
    with:
      netlify_site_id: "..."
      production_deploy: true
    secrets:
      netlify_auth_token: ${{ secrets.NETLIFY_AUTH_TOKEN }}

Note: the github context is allowed in on.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

Defaults to the previous expression, so callers are unaffected.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@browniebroke browniebroke changed the title feat(netlify-deploy): add a production_deploy input fea: add a production_deploy input to netlify-deploy workflow Sep 13, 2026
@browniebroke browniebroke changed the title fea: add a production_deploy input to netlify-deploy workflow feat: add a production_deploy input to netlify-deploy workflow Sep 13, 2026
@browniebroke
browniebroke merged commit 7b06919 into main Sep 13, 2026
1 check passed
@browniebroke
browniebroke deleted the feat/netlify-production-deploy-input branch September 13, 2026 10:01
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