Add Gitea webhook auto-deploy scripts and config template.

Co-authored-by: Cursor <cursoragent@cursor.com>
这个提交包含在:
可乐加冰
2026-09-23 17:46:31 +08:00
父节点 f7d3d7d1bd
当前提交 0ee8f55aba
共有 7 个文件被更改,包括 253 次插入 和 1 次删除

18
public/gitea_webhook.php 普通文件
查看文件

@@ -0,0 +1,18 @@
<?php
/**
* Gitea Web 钩子入口(仅 POST + 签名校验)
* 配置:项目根目录 deploy/config.php(勿提交仓库)
*/
$configFile = dirname(__DIR__) . '/deploy/config.php';
if (!is_file($configFile)) {
http_response_code(500);
header('Content-Type: text/plain; charset=utf-8');
echo 'Missing deploy/config.php — copy deploy/config.example.php';
exit;
}
$config = require $configFile;
require dirname(__DIR__) . '/deploy/WebhookDeploy.php';
(new WebhookDeploy($config))->handle();