finance-pay/app/api/controller/GitWebHookController.php

15 lines
442 B
PHP
Raw Permalink Normal View History

2023-11-20 13:40:38 +08:00
<?php
2023-11-20 13:47:47 +08:00
namespace app\api\controller;
2023-11-20 13:40:38 +08:00
2023-11-20 13:47:47 +08:00
use app\common\controller\BaseLikeAdminController;
2023-11-20 13:40:38 +08:00
2023-11-20 13:47:47 +08:00
class GitWebHookController extends BaseApiController
2023-11-20 13:40:38 +08:00
{
2023-11-20 13:47:47 +08:00
public array $notNeedLogin = ['pullDevBranch'];
2023-11-20 13:40:38 +08:00
public function pullDevBranch()
{
2023-11-21 11:23:03 +08:00
$result = shell_exec("cd /opt/1panel/apps/openresty/openresty/www/sites/ceshi-pay.lihaink.cn/index && git pull");
2023-11-21 11:23:36 +08:00
\think\facade\Log::info(['git pull dev branch result', $result]);
2023-11-20 13:40:38 +08:00
}
}