We are trying to setup an automated deployment environemt with Git/Github. We have 3 different environments; local, test and live. When we add a new feature on local, we first u
I'm currently using git in such a way and just posted a blog article about here.
What I usually do is use a post-receive hook to look for commits pushed into a release branch, and when found deploys the codebase using the git archive command.
This is fine for small projects, if you have multiple developers working on a project or it's a large and complex codebase I do recommend the use of a Continuous Integration system like Jenkins as suggested in a previous comment.
Have a look at this and see if it suits your needs (includes a simple bash deployment script)
Cheers