demarches-normaliennes/lib/tasks/deploy.rake

31 lines
661 B
Ruby
Raw Normal View History

2018-09-20 11:20:57 +02:00
task :deploy do
2018-10-24 10:20:19 +02:00
domains = case ENV['STAGE']
2018-10-23 18:26:23 +02:00
when 'dev'
['web1.dev', 'web2.dev']
when 'master'
['web1', 'web2']
else
2018-10-24 10:20:19 +02:00
raise "STAGE #{STAGE} is unknown. It must be either dev or master"
end
2018-10-24 10:20:19 +02:00
branch = ENV['STAGE']
domains.each do |domain|
sh "mina deploy domain=#{domain} branch=#{branch} force_asset_precompile=true"
2018-09-03 18:36:09 +02:00
end
end
task :setup do
domains = ['web1', 'web2']
domains.each do |domain|
sh "mina setup domain=#{domain} force_asset_precompile=true"
end
end
task :setup_dev do
domains = ['web1.dev', 'web2.dev']
domains.each do |domain|
sh "mina setup domain=#{domain} force_asset_precompile=true"
end
end