Is it possible to deploy a website using git push? I have a hunch it has something to do with using git hooks to perform a git reset --hard on the
git push
git reset --hard
In essence all you need to do are the following:
server = $1 branch = $2 git push $server $branch ssh @$server "cd /path/to/www; git pull"
I have those lines in my application as an executable called deploy.
deploy
so when I want to do a deploy I type ./deploy myserver mybranch.
./deploy myserver mybranch