Files
tool-node/.gitea/workflows/deploy.yaml
zhaojunlong ed03bd2032
All checks were successful
Deploy Vue App / build-and-deploy (push) Successful in 13s
```
build(workflow): 更新部署流程以支持代码拉取和依赖安装

修改了 Gitea 工作流配置文件,调整部署步骤顺序:
- 添加代码检出步骤
- 增加服务停止操作
- 实现源码拷贝功能
- 改进依赖安装与服务重启逻辑

同时修正 YAML 文件中的引号使用问题,确保分支名称正确解析。
```
2025-12-16 09:43:53 +08:00

33 lines
919 B
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

name: Deploy Vue App
# 触发条件:推送到 master 分支时执行
on:
push:
branches: ["南京公共资源交易中心"]
env:
IP: 106.15.181.192
REMOTE_DIR: /www/wwwroot/tb.test.haizhiyustc.com/
jobs:
build-and-deploy:
# 运行在已注册的 runner 上(确保 runner 标签匹配,默认无标签可省略)
runs-on: [test]
steps:
# 步骤 1拉取代码
- name: Checkout code
uses: https://gitee.com/skr2005/checkout@v4
# 步骤 2停止服务
- name: Stop service
run: net stop tool-node
# 步骤 3拷贝源码到目标目录
- name: Copy source to target
run: xcopy /E /I /Y "${{ github.workspace }}\*" "D:\tools\tool-node\"
# 步骤 4安装依赖并启动服务
- name: Install and start service
run: |
cd D:\tools\tool-node
npm install
net start tool-node