Hi do people here use a recommended approach for s...
# github-actions
a
Hi do people here use a recommended approach for setting up deployments to staging and production? Currently at my company we have a few variations: Variation 1 • Deploy to staging on push to staging branch • Deploy to prod on push to master Variation 2 • Deploy to staging on push to master • Deploy to prod on tagging master Variation 3 • Deploy to staging on workflow_dispatch • Deploy to production on workflow_dispatch We're looking to try and encourage everyone to deploy the same way. I quite like "variation 3" as you're in more control of when things are deployed, plus you can add approvers for production deploys.
d
We’re looking to try and encourage everyone to deploy the same way
IMO I’d advise you to stick with allowing teams to define their own deployment strategy. I find that trying to reign every project into the same method typically means adding unnecessary steps into the process for smaller projects which means wasted time or worse people just circumventing the process because it’s annoying. My recommendation would be to define a few workflow templates (by which I mean 2 or 3) then come up with the deployment strategy for each template, clearly define it and then have each project clearly state which template they’re using. This provides clarity for team members to be able to contribute across multiple projects without being too restrictive.
🙏 1
👌 1