Skip to content

Instantly share code, notes, and snippets.

@datapimp
Created February 16, 2012 17:14
Show Gist options
  • Select an option

  • Save datapimp/1846536 to your computer and use it in GitHub Desktop.

Select an option

Save datapimp/1846536 to your computer and use it in GitHub Desktop.
Multi Stage Capistrano Deployment Workflow for your development team
# Everyone should be committing to master, or to their own respective feature branches.
# When it comes time to deploy, you should do the following:
# check out the staging branch
git checkout staging
# sync up with whatever is currently there
git pull origin staging
# merge your master branch into staging
# if you would like to cherry pick certain commits, you can do that here as well
git merge master
# push the current staging HEAD to github
git push origin staging
# deploy the latest staging branch to your staging environment
bundle exec cap staging deploy
# Let the suits, your QA team, your tech lead, your mom, whoever, sign off on the
# quality of the staging server release. Then when it comes time to make a production deployment...
# check out production
git checkout production
# sync up
git pull origin production
# merge in your staging branch ( or master, if you want to skip the staging step )
git merge staging
# push to the latest production remote
git push origin production
# deploy the latest remote
bundle exec cap production deploy
# BOOOM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment