Copy local files to remote server using capistrano 3
With this nice and easy pro-tip you could copy configuration files (among other) to your #{shared_path}
using a capistrano task.
It was tested only on Capistrano 3
namespace :devops do
desc "Copy files"
task :copy do
on roles(:all) do |host|
%w[ file.one file.two ].each do |f|
upload! '/path/fo/file/' + f , '/remote/path/' + f
end
end
end
end
Written by Boris Quiroz
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Capistrano
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#