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.
Asked
Active
Viewed 406 times
2 Answers
0
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

xlogan
- 11
- 2
-
This is a good reference, though it does not answer the question directly. I think I can learn from your idea to config deploy with git sub dir. – Phương Nguyễn Apr 12 '14 at 05:21
0
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

Dhaulagiri
- 3,281
- 24
- 26