diff options
Diffstat (limited to 'config/deploy.rb')
-rw-r--r-- | config/deploy.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/config/deploy.rb b/config/deploy.rb index e4c7afd8b..05009223a 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -1,4 +1,5 @@ require 'bundler/capistrano' +require 'cape' # Deploy to staging by default unless you specify '-S stage=production' on the command line set :stage, 'staging' unless exists? :stage @@ -17,6 +18,16 @@ set :use_sudo, false server configuration['server'], :app, :web, :db, :primary => true +namespace :rake do + Cape do + # Don't simply mirror all rake tasks because of a issue with Cape + # https://github.com/njonsson/cape/issues/7 + mirror_rake_tasks 'themes:install' do |env| + env['RAILS_ENV'] = rails_env + end + end +end + namespace :deploy do desc "Restarting mod_rails with restart.txt" task :restart, :roles => :app, :except => { :no_release => true } do @@ -39,3 +50,5 @@ namespace :deploy do run links.map {|a| "ln -sf #{a.last} #{a.first}"}.join(";") end end + +after 'deploy:update_code', 'rake:themes:install' |