No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

deploy.rb 726B

123456789101112131415161718192021222324252627282930313233
  1. # frozen_string_literal: true
  2. require 'mina/scp'
  3. set :domain, ENV['JALCINE_DEPLOY_DOMAIN']
  4. set :deploy_to, ENV['JALCINE_DEPLOY_PATH']
  5. set :verbose, true
  6. set :keep_releases, 5
  7. set :shared_paths, ['images']
  8. set :user, ENV['JALCINE_DEPLOY_USER']
  9. set :group, ENV['JALCINE_DEPLOY_GROUP']
  10. set :ssh_options, '-A'
  11. task :upload do
  12. ssh "mkdir -p #{deploy_to}/tmp-scp"
  13. scp_upload("#{Dir.pwd}/_deploy/*", "#{deploy_to}/tmp-scp",
  14. recursively: true,
  15. verbose: true)
  16. queue "cp -r #{deploy_to}/tmp-scp/* ."
  17. end
  18. desc 'Deploys the current version to the server.'
  19. task deploy: :environment do
  20. deploy do
  21. invoke :upload
  22. to :launch do
  23. queue "chown :#{group} -Rc #{deploy_to}"
  24. end
  25. end
  26. end