refactor deploy.rb