Mostly forked from - https://gist.github.com/domenic/ec8b0fc8ab45f39403dd but there are some other things in here
In the root of your project, create a deploy script. I decided to place mine in ./bin/deploy.sh
but you could put in any where
deploy.sh
#!/bin/bash