Revert "ci: 添加Gitea工作流用于Go项目部署到宝塔"

This reverts commit 00e7d34b03.
This commit is contained in:
sun
2026-05-10 22:32:20 +08:00
parent 00e7d34b03
commit 25e09cd54f
-36
View File
@@ -1,36 +0,0 @@
name: Go CI/CD Deploy to Baota
on:
push:
branches: [ main, master ]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: 拉取代码
uses: actions/checkout@v4
- name: 安装 Go 环境
uses: actions/setup-go@v5
with:
go-version: 1.22
- name: 编译 Go 项目
run: |
# 静态编译,无依赖,适合 Linux 部署
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o app main.go
- name: 部署到宝塔项目目录并重启服务
run: |
# 1. 停止旧进程
pkill -f Volcano-Engine-TTS-UI || true
# 2. 复制新程序到项目目录
cp ./app /www/wwwroot/Volcano-Engine-TTS-UI/
# 3. 赋予执行权限
chmod +x /www/wwwroot/Volcano-Engine-TTS-UI/app
# 4. 启动新进程(后台运行)
nohup /www/wwwroot/Volcano-Engine-TTS-UI/app > /www/wwwroot/Volcano-Engine-TTS-UI/app.log 2>&1 &