Oliver Roos on Unsplash

Deploy to multiple environments with git and CircleCI

Hugo Di Francesco

--

Easily deploying to multiple environments in a simple manner using GitHub, CircleCI and Heroku.

Continuous Integration is awesome, but sometimes you need a buffer between auto-deploying things on merge and the production release. To do that with CircleCI requires some git branch-wrangling and a few lines of bash scripting. We’ll imagine a scenario where a deploy is trivial (ie. we’ll pretend we’re using Heroku). For more complicated build steps we should still be able to follow similar principles. This is not a CircleCI 2.0 workflows tutorial, it’s more of a git-flow/CircleCI hybrid to have 2 (or more) environments being released to and automatically deployed by CircleCI.

I would like to thanks Chris Fidao, and this tweet:

We’ll go through how to use GitHub + CircleCI for deployment automation and release management.

This was sent out on the Code with Hugo newsletter last Monday.

Subscribe to get the latest posts right in your inbox (before anyone else).

A branch setup 🌳

--

--