Deploy to production with git tags #199
Replies: 3 comments 1 reply
-
Seems like you've got a good grasp of the workarounds and alternatives. Thanks for the suggestion! |
Beta Was this translation helpful? Give feedback.
-
Branches are quite literally made for this purpose. Tagging wasn't built for this and I think the behavior wouldn't be as satisfactory as you may think. One thing you lose is the ability to essentially "revert" back to an old version, among other features. Despite my opinion, if your team works well this way, I think Vercel should look into the use case and see what they can do with it. Definitely unique. |
Beta Was this translation helpful? Give feedback.
-
Tags/releases are a pretty common deployment model, especially with codebases that require multiple versions of the code running at the same time. Often you will run a tag in a variety of environments before it is promoted to production. We use tagging across all of our codebases and adhere to the principle that any branch that is not main should be short-lived. The main branch is the source of truth for the codebase but having environments coupled with branches is not really an optimal way of releasing code. @ryanhaticus I disagree with the point that you can't revert back to an old version. Tagging makes this a lot easier and the resulting workflow means you end up with a clean, and easy to understand git history containing deployable snapshots rather than multiple branches that may or may not be in sync. The way our workflow works for non-Vercel codebases is: xxx-feature-branch - a feature branch deploy (Vercel does this very well) We can quickly test the compatibility between tags and other parts of the system (tagged backends to make sure there are no breaking changes) and promote/demote as needed. |
Beta Was this translation helpful? Give feedback.
-
Hello,
It would be handy if we could use git tags as a way to release to production. The use case is that we would like
main
to deploy to a staging URL where we can QA multiple PR's. When we are happy, we would then release by tagging themain
branch.An alternative is to have a specific
production
branch, which we mergemain
into, and while this would work, it is not as clean as using tags. We could potentially use Github Actions to deploy with a custom vercel script, but I presume we would lose out on some the git information within the vercel dashboard.Thanks,
Nick.
Beta Was this translation helpful? Give feedback.
All reactions