|
|
|
@ -22,12 +22,12 @@ steps: |
|
|
|
# 拷贝编译产物 |
|
|
|
- cp backend/short-link-server /opt/short-link/short-link-server |
|
|
|
- cp -r frontend/dist/* /opt/short-link/frontend/ |
|
|
|
- cp Caddyfile ~/projects/_conf/short-link.conf |
|
|
|
# 进入部署目录,用 nohup 后台启动服务(先杀死旧进程,避免端口冲突) |
|
|
|
- cd /opt/short-link |
|
|
|
- pkill -f short-link-server || true |
|
|
|
# nohup 启动,日志输出到 nohup.out |
|
|
|
- nohup ./short-link-server > nohup.out 2>&1 & |
|
|
|
- mv ./Caddyfile ~/projects/_conf/short-link.conf |
|
|
|
- cd ~ |
|
|
|
- caddy reload |
|
|
|
depends_on: |
|
|
|
|