Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 :)

share|improve this question
up vote 0 down vote accepted

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.

share|improve this answer
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 4:32

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.