我使用部署器来部署我的 Laravel 项目。像下面
<?php
namespace Deployer;
require 'recipe/laravel.php';
// Project repository
set('repository', 'git@mygit.git');
// Shared files/dirs between deploys
add('shared_files', []);
add('shared_dirs', []);
// Writable dirs by web server
add('writable_dirs', []);
// copy relies
add('copy_dirs', ['node_modules', 'vendor']);
before('deploy:vendors', 'deploy:copy_dirs');
// Hosts
host('ip')
->user('www-data')
->identityFile('~/.ssh/id_rsa')
->set('deploy_path', '/var/www/example.com.deploy');
// [Optional] if deploy fails automatically unlock.
after('deploy:failed', 'deploy:unlock');
// Migrate database before symlink new release.
before('deploy:symlink', 'artisan:migrate');
但是部署者将从主分支部署代码,我想要的是部署最新版本分支的代码。
我怎样才能做到这一点?我阅读了文档,但没有任何帮助。非常感谢!