1

We are using two Linodes to host our application: one for production and one for staging.

I would like to set it up so that when code is pushed to the development branch of our Git repository, the code is automatically deployed to the staging server. And when code is pushed to the master branch, that code is automatically deployed to our production server.

I've seen a couple of scripts similar to GitHubHook which use GitHub's Service Hooks feature, but I can't find any examples where master and development are deployed to different servers entirely (rather than just different subfolders of the same server).

What options are available to me? Any answer that can point me in the right direction would be greatly appreciated!

I can clarify the question if needed :)

Andrew
  • 195
  • 1
  • 1
  • 8

1 Answers1

0

I would highly recommend investing in a CI/Build system such as Jenkins or Atlassian Bamboo.

Bamboo is a nice tool for DevOps and would easily solve your problem. It watches your repos for commits and can kick off automated builds, unit tests, and deployments. You can configure build plans and deployment tasks for your multiple branches.

diz
  • 309
  • 1
  • 4
  • Just an update, I ended up with Capistrano and have been super happy! It doesn't deploy automatically on push, but it's only an additional command to pull the respective branch when SSHed into our production/staging/test servers (which we aliased to "deploy"). Thanks again for your answer. – Andrew Feb 26 '14 at 04:32