updating rdig on deploy

written by Scott on October 16th, 2007 @ 11:42 AM

Here’s a simple little Capistrano 2.0 recipe to update your rdig search index after every deploy.

Add the following lines to config/deploy.rb

1
2
3
4
5
6
7
8
namespace :deploy do 
  after :deploy, "deploy:update_rdig"

  desc "Update the rdig database.  This has to be done after re-starting, as it looks at the live web-site"
  task :update_rdig do
    run "cd #{current_path} && rdig -c config/rdig_config.rb"
  end
end

This will run automatically after every deploy. If you just want to run it manually, comment out the line that starts with after .... You can then run it manually with cap deploy:update_rdig

Comments are closed