News for hackers. Stuff that matters.
Re:Poll: How often do you deploy to production? by shawabawa3 on Thursday June 27, 2013 @06:10AM (#5951471)
> Push to remote repo - SSH to server, and then pull from the same repo

I have a server setup with a headless git repo and non-headless one. When I push to the headless repo, the post-receive hook goes to the other repo, pulls from the headless, runs tests and restarts the server

So to deploy I just do

    git push deploy master
And get instant feedback that all the tests passed and server was restarted
Re:Poll: How often do you deploy to production? by andyhmltn on Thursday June 27, 2013 @06:14AM (#5951480)
That's kind of what I do at the moment but I ended up just ditching the hook as it's not usually needed. I use a headless repo on the server that is then pulled into the live folder.

I always found that the hook never really worked for some bizarre reason. Even something as simple as:

cd /home/deployer/wordpress/wp-content/themes/my-theme && git pull origin master

failed.

Re:Poll: How often do you deploy to production? by shawabawa3 on Thursday June 27, 2013 @06:28AM (#5951516)
Strange, it might be to do with GIT_WORK_TREE and GIT_DIR being set (they are set automatically in hooks I think).

My hook is:

    cd $REPO_DIR
    
    unset GIT_DIR
    unset GIT_WORK_TREE
    
    git checkout deploy && \
    git stash && \
    git pull
Re:Poll: How often do you deploy to production? by andyhmltn on Thursday June 27, 2013 @06:30AM (#5951528)
I'll reply here again: Thanks for that! I'll check it out now