diff --git a/.circleci/config.yml b/.circleci/config.yml index 90725ad32..45417e72c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -64,7 +64,7 @@ jobs: - "0a:67:42:7d:7e:b7:e1:3c:48:8f:bf:68:10:51:a8:44" - deploy: command: | - if [ "${CIRCLE_BRANCH}" == "staging" ]; then + if [ "${CIRCLE_BRANCH}" == "develop" ]; then bundle exec rake deploy_ha fi diff --git a/config/deploy.rb b/config/deploy.rb index eae817ea8..ef1d6b4e1 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -15,7 +15,6 @@ raise "Bad to=#{+ENV['to']}" unless ["staging", "production"].include?(ENV['to'] raise "missing domain, run with 'rake deploy domain=37.187.154.237'" if ENV['domain'].nil? -print "Deploy to #{ENV['to']} environment branch #{branch}\n" # set :domain, '5.135.190.60' set :domain, ENV['domain'] @@ -26,25 +25,19 @@ set :deploy_to, '/var/www/tps_dev' case ENV["to"] when "staging" - if ENV['branch'].nil? - set :branch, 'staging' - else - set :branch, ENV['branch'] - end + set :branch, ENV['branch'] || 'develop' set :deploy_to, '/var/www/tps_dev' set :user, 'tps_dev' # Username in the server to SSH to. appname = 'tps_dev' when "production" - if ENV['branch'].nil? - set :branch, 'master' - else - set :branch, ENV['branch'] - end + set :branch, ENV['branch'] || 'master' set :deploy_to, '/var/www/tps' set :user, 'tps' # Username in the server to SSH to. appname = 'tps' end +print "Deploy to #{ENV['to']} environment branch #{branch}\n" + set :rails_env, ENV["to"] # For system-wide RVM install.