厨师和 git 结帐

Chef and git checkout

我目前正在使用 Chef 在 opsworks 上部署服务器,然后使用 'deploy' 配方,从私有存储库部署应用程序。

一切都按预期工作,因为我的存储库已正确克隆。尽管它克隆了我的目录,但我最终得到了许多子目录,例如

我想做的只是让主分支不在子文件夹中,所以我实质上是从 git.

获取我的网络应用程序的根目录

我目前的厨师代码看起来像

deploy '/var/www/html' do
  repo 'myrepo.git'
  git_ssh_wrapper "/git-ssh-wrapper" # For private Git repos 
  deploy_to '/var/www/html'
  symlink_before_migrate.clear
  create_dirs_before_symlink.clear
  purge_before_symlink.clear
  symlinks.clear
  action :deploy
end

我不确定上面的 'action' 是否不正确,或者我应该使用 'deploy_revision' 而不是部署在这里?

谢谢

使用 git 资源而不是 deploy 资源。