-
bare repository in
/var/git/azurefire.git
initialized with:
git clone --bare [email protected]:smashwilson/azurefire.git /var/git/azurefire.git
-
live working copy in
/var/webapp/azurefire
initialized with:
git clone /var/git/azurefire.git /var/webapp/azurefire
-
set up the post-receive hook in the bare repository
See
/var/git/azurefire.git/hooks/post-receive
below, which calls${HOME}/bin/azure-deploy
to finalize the deployment. I'm not sure why I put azure-deploy in my home directory; probably so I can trigger it manually?Also, these should probably be running
set -e
to fail on the first nonzero exit. Hmm. -
to do a deployment, add the bare repository as a remote:
git remote add live [email protected]:/var/git/azurefire.git
and trigger deployment with a push:
git push live master