SERVER="admin@vodka.zodal.net" APP_DIR="/data/webserver/clients/airnzning/website/" task :default => [:deploy] desc "Deploy the app" task :deploy do sh "rsync -vvaP --exclude '.git/*' --exclude '*.sw?' --exclude '*~' . #{SERVER}:#{APP_DIR}" end desc "Remove the app from the server and do a clean deploy" task :deploy_clean => [:clean, :deploy] desc "Remove the app files from the server" task :clean do sh "ssh #{SERVER} -t 'rm -rf #{APP_DIR}'" end