ci: 部署触发改为 test 分支(按平台发布纪律:合并 main→test 即发布到测试区的决定),部署目录跟踪 origin/test
deploy-hxtesting / build-and-deploy (push) Successful in 1m50s

This commit is contained in:
syadmin committed 2026-11-14 21:44:17 +08:00
1 parent a29ed6ff24
commit 89392b0fa4
1 file changed
+4 -4
+4 -4
View File
@@ -1,5 +1,5 @@
# hxtesting 测试服自动部署
# 触发:push 到 main(同事更新代码后自动构建部署),也支持手动触发
# 触发:push 到 test 分支(按平台发布纪律:合并 main→test 即一次发布决定),也支持手动触发
# 执行:hxtesting 宿主上的 gitea-runner(label=deploy-host,host 模式)
# 说明:构建 app/frontend 镜像并顶替同名 latest tag,docreader/sandbox 等沿用官方镜像;
# 每次构建额外打 sha-<短提交> tag 便于回滚。
@@ -7,7 +7,7 @@ name: deploy-hxtesting
on:
push:
branches: [main]
branches: [test]
workflow_dispatch:
jobs:
@@ -21,8 +21,8 @@ jobs:
run: |
set -e
cd "$DEPLOY_DIR"
git fetch origin main
git reset --hard origin/main
git fetch origin
git checkout -q -B test origin/test
echo "GIT_SHA=$(git rev-parse --short HEAD)" >> "$GITHUB_ENV"
echo "当前部署提交: $(git log --oneline -1)"