Permalink
Browse files

updates to deploy process to enable new nginx-related crontab and to …

…load site skins

Signed-off-by: shalott <shalott@gmail.com>
  • Loading branch information...
1 parent 2b86fb9 commit 857b9a2bf14b7bd96ac81791f784f1a6284a3207 @shalott shalott committed May 5, 2012
Showing with 9 additions and 0 deletions.
  1. +8 −0 config/deploy.rb
  2. +1 −0 config/deploy/staging.rb
View
8 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"
View
1 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"

0 comments on commit 857b9a2

Please sign in to comment.