Implemented deploy.php from https://gist.github.com/oodavid/1809044