// webistrano recipe used to deploy with sftp access only
desc "Setup the rail environment"
namespace :deploy do
task :setup do
end
task :default do
update_code
restart
end
task :update_code, :except => { :no_release => true } do
on_rollback { run "rm -rf #{release_path}; true" }
strategy.deploy!
end
task :symlink, :except => { :no_release => true } do
end
task :restart, :roles => :app do
Net::SSH.start(host, user, password) do |ssh|
ssh.sftp.connect do |sftp|
sftp.remove("#{restart_file}")
end
end
end
end