ci(deploy): deploy images over ssh from gitea actions

This commit is contained in:
2026-07-07 15:02:02 +08:00
parent 6867b165a1
commit 75bc817a59
8 changed files with 290 additions and 62 deletions
+4 -4
View File
@@ -1,9 +1,9 @@
#!/bin/bash
# 推送指定分支到指定远端
# 期望服务器端 post-receive hook 已就位;本脚本只做 git push,不负责构建/启动
# 调用方:deploy_web.shproduction)→ push_to_remote "production" "main"
# deploy_web_test.shtest)→ push_to_remote "test" "test"
# 推送指定分支到指定远端
# 当前发布由 Gitea Actions 构建镜像并通过 SSH 部署;本脚本只负责触发分支 push。
# 调用方:deploy_web.shproduction)→ push_to_remote "gitea" "main"
# deploy_web_test.shtest)→ push_to_remote "gitea" "test"
push_to_remote() {
local remote="$1"
local branch="$2"
+3 -3
View File
@@ -1,6 +1,6 @@
#!/bin/bash
# ==========================================
# 生产环境 Web 部署脚本(Next.js + git push 模型)
# 生产环境 Web 部署脚本(Next.js + Gitea Actions SSH 部署模型)
# 原始 Dart: scripts/deploy/deploy_web.sh
# ==========================================
@@ -11,8 +11,8 @@ source "$SCRIPT_DIR/_deploy_lib.sh"
# 主函数
main() {
push_to_remote "production" "main"
purge_cdn_cache
push_to_remote "gitea" "main"
# NEW_VERSION=$(bump_version)
}
main
+2 -3
View File
@@ -1,6 +1,6 @@
#!/bin/bash
# ==========================================
# 测试环境 Web 部署脚本(Next.js + git push 模型)
# 测试环境 Web 部署脚本(Next.js + Gitea Actions SSH 部署模型)
# 原始 Dart: scripts/deploy/deploy_web_test.sh
# ==========================================
@@ -11,8 +11,7 @@ source "$SCRIPT_DIR/_deploy_lib.sh"
# 主函数
main() {
push_to_remote "test" "test"
purge_cdn_cache
push_to_remote "gitea" "test"
}
main