Skip to content

Instantly share code, notes, and snippets.

@ianiv
Created August 27, 2012 22:04
Show Gist options
  • Save ianiv/3492746 to your computer and use it in GitHub Desktop.
Save ianiv/3492746 to your computer and use it in GitHub Desktop.
Precompile and upload assets
load 'deploy/assets'
namespace :deploy do
namespace :assets do
desc 'Precompile assets locally and upload them to the server'
task :precompile, :roles => assets_role, :except => { :no_release => true } do
run_locally "bundle exec rake assets:precompile"
top.upload("public/assets", "#{shared_path}", via: :scp, recursive: true)
run_locally "bundle exec rake assets:clean"
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment