refactor: remove dead deploy code
This commit is contained in:
parent
d0f77d0aab
commit
2127f8cef1
1 changed files with 0 additions and 38 deletions
|
@ -1,42 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
def domains_for_stage
|
||||
if ENV['DOMAINS'].present?
|
||||
ENV['DOMAINS'].split
|
||||
else
|
||||
raise "DOMAINS is empty. It must be something like DOMAINS='web1.dev web2.dev'"
|
||||
end
|
||||
end
|
||||
|
||||
task :setup do
|
||||
domains = domains_for_stage
|
||||
|
||||
domains.each do |domain|
|
||||
sh "mina setup domain=#{domain}"
|
||||
end
|
||||
end
|
||||
|
||||
task :deploy do
|
||||
domains = domains_for_stage
|
||||
branch = ENV.fetch('BRANCH')
|
||||
|
||||
domains.each do |domain|
|
||||
sh "mina deploy domain=#{domain} branch=#{branch} force_asset_precompile=true"
|
||||
end
|
||||
end
|
||||
|
||||
task :post_deploy do
|
||||
domains = domains_for_stage
|
||||
branch = ENV.fetch('BRANCH')
|
||||
|
||||
sh "mina post_deploy domain=#{domains.first} branch=#{branch}"
|
||||
end
|
||||
|
||||
task :rollback do
|
||||
domains = domains_for_stage
|
||||
branch = ENV.fetch('BRANCH')
|
||||
|
||||
domains.each do |domain|
|
||||
sh "mina rollback service:restart_puma service:reload_nginx service:restart_delayed_job domain=#{domain} branch=#{branch}"
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue