chore(deploy): add pre-flight checks, dry-run mode, canary sync, path safety and fail-fast#243
Merged
Merged
Conversation
…nary sync and dry-run support
…nary sync and dry-run support
…nary sync and dry-run support
…nary sync and dry-run support
…nary sync and dry-run support
… safety and fail-fast
… safety and fail-fast
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
michaeljymsgutierrez
added a commit
that referenced
this pull request
Jun 30, 2026
- [c099dd9][michaeljymsgutierrez]: Updated release version from v2.9.0 to v2.9.1 - 2026-07-01 02:27:36 - [9ca0c99][Chael Gutierrez]: fix(deploy): rename release branch prefix to releases to avoid ref collision (#245) - 2026-07-01 02:26:00 - [f823754][Chael Gutierrez]: chore(deps): fix dependabot security alerts - upgrade vite, vitest, form-data and markdown-it (#244) - 2026-07-01 01:55:56 - [2fcec47][Chael Gutierrez]: chore(deploy): add pre-flight checks, dry-run mode, canary sync, path safety and fail-fast (#243) - 2026-07-01 01:36:47 - [8cf2be1][Chael Gutierrez]: test(units): improve test structure and expand coverage across all unit modules (#242) - 2026-07-01 00:38:33 - [81e929f][Chael Gutierrez]: docs(contributing): add branch purposes, flow diagram, and toc updates (#241) - 2026-06-29 02:27:20 - [9e02459][Chael Gutierrez]: docs(contributing): add CONTRIBUTING.md and link from README (#240) - 2026-06-29 02:07:47 - [b8e9297][Chael Gutierrez]: chore(deps): upgrade production dependencies (#239) - 2026-06-24 02:57:14
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.
Description
Improves the reliability, safety, and usability of
deploy.sh. Adds pre-flight checks to block unauthorized or misconfigured deploys before anything runs, introduces a--dry-runmode to preview a release without executing it, fixes fragile directory navigation with absolute paths, syncs the missingcanarystaple branch during release cleanup, corrects the release branch naming convention, and addsset -euo pipefailfor fail-fast behavior.Github Issue: N/A
Changes
deploy.sh- addedset -euo pipefailto exit immediately on any command failuredeploy.sh- addedPROJECT_ROOTvariable and replaced all fragilecdchains with absolute pathsdeploy.sh- addedGIT_OWNERandNPM_OWNERconstants for authorization checksdeploy.sh- addedrun_cmd()helper to print or execute commands based on dry-run modedeploy.sh- added--dry-run/-dflag with yellow banner andv0.0.0-dry-runversion placeholderdeploy.sh- addedcheck_dependencies()to verifyjq,npm,yarn,git,awkare installeddeploy.sh- addedcheck_git_auth()to restrict deploys to the authorized git usernamedeploy.sh- addedcheck_npm_auth()to verify the correct npm user is logged in before publishingdeploy.sh- fixed release branch prefix fromreleases/vX.X.Xtorelease/vX.X.Xper branch naming conventiondeploy.sh- addedcanarybranch tosync_repositoryandcleanup_release_version_branchdeploy.sh- changedexit 1toreturn 1in all check and validation functions for consistentStatus: failedoutputdeploy.sh- added|| truetogrep -vpipe to preventpipefailfalse failuresdeploy.sh- added|| truetoread -pto handle non-interactive stdin safelydeploy.sh- quoted$VERSION_TYPEargument inprepare_release_versioncallScreenshots/Images
N/A
How Has This Been Tested?
bash -n deploy.shsyntax check passes clean./deploy.sh --dry-run stable:minorprints all steps without executingChecklist
Reviewer Guidance
run_cmd()- safe to verify by searching forrun_cmdvs bare commandscheck_dependencies,check_git_auth,check_npm_authall run before any git or file operationsrelease/vX.X.Xmatching the branch naming convention inCONTRIBUTING.mdcanaryis now synced on bothsync_repositoryandcleanup_release_version_branch- was previously missingset -euo pipefailat line 2 ensures any uncaught failure halts the script immediately