Easy way to deploy PHP sites from git

I'm looking for recommendations on how to automate / simplify deployment from a git repository (github) to a hosting service. The hosting service supports FTP (yuck) / SSH / SFTP access.

Any good tools out there to give push-button deployment of new revisions? I know it's not a hard script to write, but when you start thinking about things like roll-back and multiple sites, it gets complicated enough that I'd rather not re-invent the wheel.


Solution 1:

If you don't want to install git on the remote (hosting) server then there are a couple of pretty good options:

CodeBase

Beanstalk

I prefer the latter because it's version tracking and deployment features are combined.

I have also seen people who do have git installed on their remote server use a cron job to run git pull every few hours. This works best if you have a branch for live completed code and a branch for new features etc.

Update:

It's actually an application called Deploy that CodeBase integrates with (both made by the same team).

www.deployhq.com

Solution 2:

I've found Pagodabox to be the easiest repo as well as host to develop on, and its free for basic accounts.