Is there a way to deploy a subdirectory of the repo through Mina? I've seen people using custom deploy strategy to achieve this with Capistrano and I would like to be able to do it with Mina.
Please check out this repo, https://github.com/thopham/mina-rsync, stage-sub-folder branch. Please see also my gist, https://gist.github.com/xlogan/10519195
I was able to fix this by wrapping a number of the setps in a in_directory './rails' do
end
block like this (my rails app is under the rails
directory):
task :deploy => :environment do
deploy do
# stop accepting new workers
invoke :'sidekiq:quiet'
# Put things that will set up an empty directory into a fully set-up
# instance of your project.
invoke :'git:clone'
in_directory './rails' do
invoke :'deploy:link_shared_paths'
invoke :'bundle:install'
invoke :'rails:db_migrate'
invoke :'deploy:cleanup'
end
to :launch do
in_directory './rails' do
#invoke :'sidekiq:restart'
invoke :'unicorn:restart'
end
end
end
end
来源:https://stackoverflow.com/questions/22524467/deploy-subdirectory-with-mina