Skip to content

chore: add force deployment option to bypass changeset guard#7727

Merged
liuliu-dev merged 1 commit intomainfrom
chore/allow-force-deployments
Apr 3, 2026
Merged

chore: add force deployment option to bypass changeset guard#7727
liuliu-dev merged 1 commit intomainfrom
chore/allow-force-deployments

Conversation

@francinelucca
Copy link
Copy Markdown
Member

This pull request updates the production deployment workflow to add an option for manually forcing a deployment, even if there are unreleased changes. This provides more flexibility for urgent or exceptional deployment scenarios.

@francinelucca francinelucca requested a review from a team as a code owner April 3, 2026 17:29
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 3, 2026

⚠️ No Changeset found

Latest commit: 36f8056

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@francinelucca francinelucca requested a review from liuliu-dev April 3, 2026 17:30
@github-actions github-actions Bot added the staff Author is a staff member label Apr 3, 2026
@francinelucca francinelucca added skip changeset This change does not need a changelog integration-tests: skipped manually Changes in this PR do not require an integration test labels Apr 3, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the production deployment GitHub Actions workflow to allow manually forcing a deployment via workflow_dispatch, intended to bypass the existing “changeset guard” that prevents deploying when unreleased changesets are present.

Changes:

  • Added a workflow_dispatch boolean input force_deploy to support manual forced deployments.
  • Updated the guard job’s should_deploy output to allow bypassing the existing deploy gating logic when force_deploy is enabled.

# If it's 0, we deploy.
should_deploy: ${{ steps.changeset-count.outputs.change_count == 0 && steps.has-pages.outputs.pages == 1 }}
# If it's 0, we deploy. Can be bypassed with force_deploy input.
should_deploy: ${{ inputs.force_deploy == true || (steps.changeset-count.outputs.change_count == 0 && steps.has-pages.outputs.pages == 1) }}
Copy link

Copilot AI Apr 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should_deploy reads inputs.force_deploy and compares it to the boolean true. In this repo, workflow_dispatch booleans are typically read from github.event.inputs.<name> and treated as strings (e.g. release-schedule.yml uses DRY === 'true'), and inputs isn’t reliably populated for non-workflow_dispatch triggers like push. As written, force_deploy may never evaluate true (if the value is 'true') and/or could break evaluation on push. Suggest switching to github.event.inputs.force_deploy == 'true' with a safe fallback for non-dispatch runs, or guarding on github.event_name == 'workflow_dispatch' before reading the input.

Suggested change
should_deploy: ${{ inputs.force_deploy == true || (steps.changeset-count.outputs.change_count == 0 && steps.has-pages.outputs.pages == 1) }}
should_deploy: ${{ (github.event_name == 'workflow_dispatch' && github.event.inputs.force_deploy == 'true') || (steps.changeset-count.outputs.change_count == 0 && steps.has-pages.outputs.pages == 1) }}

Copilot uses AI. Check for mistakes.
Comment on lines +26 to +27
# If it's 0, we deploy. Can be bypassed with force_deploy input.
should_deploy: ${{ inputs.force_deploy == true || (steps.changeset-count.outputs.change_count == 0 && steps.has-pages.outputs.pages == 1) }}
Copy link

Copilot AI Apr 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new force_deploy bypass is applied to the entire guard condition, including the has-pages check. That means a forced run would proceed even when steps.has-pages.outputs.pages != 1, which likely leads to a failing/no-op deploy and doesn’t match the intent of “bypass changeset guard” only. Consider keeping the has-pages requirement and only bypassing the changeset-count portion of the condition.

Copilot uses AI. Check for mistakes.
@liuliu-dev liuliu-dev merged commit 2755680 into main Apr 3, 2026
71 of 72 checks passed
@liuliu-dev liuliu-dev deleted the chore/allow-force-deployments branch April 3, 2026 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integration-tests: skipped manually Changes in this PR do not require an integration test skip changeset This change does not need a changelog staff Author is a staff member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants