From 857b9a2bf14b7bd96ac81791f784f1a6284a3207 Mon Sep 17 00:00:00 2001 From: shalott Date: Sat, 5 May 2012 15:09:35 -0400 Subject: [PATCH] updates to deploy process to enable new nginx-related crontab and to load site skins Signed-off-by: shalott --- config/deploy.rb | 8 ++++++++ config/deploy/staging.rb | 1 + 2 files changed, 9 insertions(+) diff --git a/config/deploy.rb b/config/deploy.rb index 3d086f0d3b8..833e22287c2 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -55,6 +55,10 @@ task :enable_new, :roles => :web do run "mv #{release_path}/public/maintenance.html #{release_path}/public/nomaintenance.html 2>/dev/null" end + desc "Update the web-related whenever tasks" + task :update_cron_web, :roles => :web do + run "whenever --update-crontab web -f config/schedule_web.rb" + end end end @@ -63,6 +67,9 @@ task :update_revision, {:roles => :backend} do run "/static/bin/fix_revision.sh" end + task :reload_site_skins, {:roles => :backend} do + run "cd #{release_path}; bundle exec rake skins:load_site_skins RAILS_ENV=production" + end task :run_after_tasks, {:roles => :backend} do run "cd #{release_path}; rake After RAILS_ENV=production" end @@ -148,5 +155,6 @@ after "deploy:symlink", "extras:update_revision" after "deploy:restart", "extras:update_cron" +after "deploy:restart", "deploy:web:update_cron_web" after "deploy:restart", "extras:restart_delayed_jobs" after "deploy:restart", "deploy:cleanup" diff --git a/config/deploy/staging.rb b/config/deploy/staging.rb index 5224a8c5050..4da0bfe5f94 100644 --- a/config/deploy/staging.rb +++ b/config/deploy/staging.rb @@ -5,5 +5,6 @@ before "deploy:migrate", "stage_only:reset_db" after "deploy:migrate", "extras:reindex_sphinx" +after "deploy:migrate", "extras:reload_site_skins" after "deploy:restart", "extras:restart_sphinx" after "deploy:restart", "stage_only:notify_testers"