Created
February 21, 2013 10:38
-
-
Save zhangyuan/5003822 to your computer and use it in GitHub Desktop.
Capistrano recipe to precompile assets locally and sync public/assets directory to web server.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace :deploy do | |
| desc "Sync the public/assets directory." | |
| task :assets_sync do | |
| system('bundle exec rake assets:precompile') | |
| find_servers(:roles => :web).each do |s| | |
| system "rsync -vr --exclude='.DS_Store' public/assets #{user}@#{s}:#{shared_path}/" | |
| end | |
| system('rm -rf public/assets') | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment