/** * Parse the incoming webhook to the deployer * * @param Deployer $deployer * * @return mixed */ public function handle(Deployer $deployer) { if ($deployer->deploy()) { return response()->json(['status' => 200, 'message' => 'Deployment successful'], 200); } return response()->json(['status' => 503, 'message' => $deployer->getErrorMessage()], 503); }
/** * Execute the deployer * * @return void */ public function fire() { if ($this->confirm('Do you wish to manually run the deployer commands?')) { if ($this->deployer->deploy()) { $this->info('Deployment successful'); return; } $this->error($this->deployer->getErrorMessage()); } }