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:04:20 +08:00
|
|
|
$result = system("cd /opt/1panel/apps/openresty/openresty/www/sites/ceshi-pay.lihaink.cn/index && git pull", $result_code);
|
2023-11-21 11:04:40 +08:00
|
|
|
\think\facade\Log::info(['git pull dev branch result1', $result]);
|
2023-11-20 13:40:38 +08:00
|
|
|
}
|
|
|
|
}
|