Skip to content
This repository
Browse code

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...
commit 857b9a2bf14b7bd96ac81791f784f1a6284a3207 1 parent 2b86fb9
astolat authored May 05, 2012
8  config/deploy.rb
@@ -55,6 +55,10 @@
55 55
     task :enable_new, :roles => :web do
56 56
       run "mv #{release_path}/public/maintenance.html #{release_path}/public/nomaintenance.html 2>/dev/null"
57 57
     end
  58
+    desc "Update the web-related whenever tasks"
  59
+    task :update_cron_web, :roles => :web do
  60
+      run "whenever --update-crontab web -f config/schedule_web.rb"
  61
+    end
58 62
   end
59 63
 end
60 64
 
@@ -63,6 +67,9 @@
63 67
   task :update_revision, {:roles => :backend} do
64 68
     run "/static/bin/fix_revision.sh"
65 69
   end
  70
+  task :reload_site_skins, {:roles => :backend} do
  71
+    run "cd #{release_path}; bundle exec rake skins:load_site_skins RAILS_ENV=production"
  72
+  end
66 73
   task :run_after_tasks, {:roles => :backend} do
67 74
     run "cd #{release_path}; rake After RAILS_ENV=production"
68 75
   end
@@ -148,5 +155,6 @@
148 155
 after "deploy:symlink", "extras:update_revision"
149 156
 
150 157
 after "deploy:restart", "extras:update_cron"
  158
+after "deploy:restart", "deploy:web:update_cron_web"
151 159
 after "deploy:restart", "extras:restart_delayed_jobs"
152 160
 after "deploy:restart", "deploy:cleanup"
1  config/deploy/staging.rb
@@ -5,5 +5,6 @@
5 5
 
6 6
 before "deploy:migrate", "stage_only:reset_db"
7 7
 after "deploy:migrate", "extras:reindex_sphinx"
  8
+after "deploy:migrate", "extras:reload_site_skins"
8 9
 after "deploy:restart", "extras:restart_sphinx"
9 10
 after "deploy:restart", "stage_only:notify_testers"

0 notes on commit 857b9a2

Please sign in to comment.
Something went wrong with that request. Please try again.