deploy.rb refactoring