Skip to content

Instantly share code, notes, and snippets.

@alChaCC
Created March 27, 2014 02:59
Show Gist options
  • Save alChaCC/9799214 to your computer and use it in GitHub Desktop.
Save alChaCC/9799214 to your computer and use it in GitHub Desktop.
lib/capistrano/tasks/sync_to_S3.cap
namespace :deploy do
namespace :assets do
desc "Synchronize assets to S3"
task :sync do
on roles(:asset_syncer) do |role|
within "#{release_path}"do
with rails_env: "#{fetch(:rails_env)}" do
execute :rake, "assets:sync"
end
end
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment