Use git post-receive
hooks to trigger automated deployment. The post-receive
hook will automatically will automatically be triggered by Git.
As an example - In hooks/post-receive
put the following
GIT_REPO=$HOME/myrepo.git
PUBLIC_WWW=/var/www/myrepo
cp $GIT_REPO $PUBLIC_WWW
If you require further detailed documentation - http://git-scm.com/book/en/Customizing-Git-Git-Hooks
An example of automated deployment on website - http://www.sitepoint.com/one-click-app-deployment-server-side-git-hooks/