namespace :deploy do namespace :sitemap do desc 'Create sitemap and ping search engines' task :refresh do on roles :web do within release_path do with rails_env: fetch(:rails_env) do execute :rake, "sitemap:refresh" end end end end desc 'Create sitemap without pinging search engines' task :create do on roles :web do within release_path do with rails_env: fetch(:rails_env) do execute :rake, "sitemap:create" end end end end desc 'Clean up sitemaps in sitemap_generator path' task :clean do on roles :web do within release_path do with rails_env: fetch(:rails_env) do execute :rake, "sitemap:clean" end end end end end end