Skip to content

Instantly share code, notes, and snippets.

@leonardehrenfried
Created October 30, 2011 17:54
Show Gist options
  • Save leonardehrenfried/1326188 to your computer and use it in GitHub Desktop.
Save leonardehrenfried/1326188 to your computer and use it in GitHub Desktop.
SSH deployment Rakefile
BASENAME = File.basename(Dir.getwd)
USER = "lenni"
HOST = "lenni.info"
PATH = "www/clients/#{BASENAME}"
task :default => ["deploy"]
desc "Deploys the content of this folder minus the .git directory"
task :deploy do
puts "*** Deploying the site ***"
sh "rsync -rvC . #{USER}@#{HOST}:#{PATH}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment