mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-01 14:06:15 +00:00
Fix auto-deployment branch (#506)
This commit is contained in:
@ -29,7 +29,8 @@ public function __invoke(Request $request)
|
||||
->firstOrFail();
|
||||
|
||||
foreach ($gitHook->actions as $action) {
|
||||
if ($action == 'deploy') {
|
||||
$webhookBranch = $gitHook->site->sourceControl->provider()->getWebhookBranch($request->array());
|
||||
if ($action == 'deploy' && $gitHook->site->branch === $webhookBranch) {
|
||||
try {
|
||||
app(Deploy::class)->run($gitHook->site);
|
||||
} catch (SourceControlIsNotConnected) {
|
||||
|
Reference in New Issue
Block a user