Extract common parts of deployment to deploy.rb