Deploy subdirectory with mina

陌路散爱 提交于 2019-12-07 15:36:21

问题


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.


回答1:


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




回答2:


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!