This commit is contained in:
parent
4b3ed5c2d5
commit
3d1681e811
@ -10,27 +10,39 @@ jobs:
|
|||||||
- name: 拉取代码仓库
|
- name: 拉取代码仓库
|
||||||
uses: http://git.missmoc.top/mocheng/checkout@v4
|
uses: http://git.missmoc.top/mocheng/checkout@v4
|
||||||
|
|
||||||
- name: Set up Node.js ${{ matrix.node-version }}
|
- name: Set up Node.js
|
||||||
uses: http://git.missmoc.top/mocheng/setup-node@v3
|
uses: http://git.missmoc.top/mocheng/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 20.x
|
node-version: 20.x
|
||||||
- name: pnpm
|
|
||||||
|
- name: 安装pnpm
|
||||||
run: npm i pnpm -g
|
run: npm i pnpm -g
|
||||||
- name: node
|
|
||||||
run: |
|
- name: 安装依赖
|
||||||
pnpm install
|
run: pnpm install
|
||||||
|
continue-on-error: false # 依赖安装失败则终止工作流
|
||||||
- name: Build
|
|
||||||
|
- name: 构建项目
|
||||||
run: pnpm build:antd
|
run: pnpm build:antd
|
||||||
- name: copy file via ssh password
|
continue-on-error: false # 构建失败则终止工作流
|
||||||
|
|
||||||
|
- name: 检查构建结果
|
||||||
|
run: |
|
||||||
|
if [ ! -d "./apps/web-antd/dist" ]; then
|
||||||
|
echo "构建目录不存在,构建失败"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if [ -z "$(ls -A ./apps/web-antd/dist)" ]; then
|
||||||
|
echo "构建目录为空,构建失败"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: 通过SSH复制文件
|
||||||
uses: http://git.missmoc.top/mocheng/scp-action@v0.1.7
|
uses: http://git.missmoc.top/mocheng/scp-action@v0.1.7
|
||||||
with:
|
with:
|
||||||
host: 127.0.0.1
|
host: 127.0.0.1
|
||||||
username: ${ { SERVER_NAME } }
|
username: ${{ secrets.SERVER_NAME }} # 使用secrets存储
|
||||||
password: ${ { SERVER_PWD } }
|
password: ${{ secrets.SERVER_PWD }} # 使用secrets存储
|
||||||
port: 11001
|
port: 11001
|
||||||
source: "./apps/web-antd/dist"
|
source: "./apps/web-antd/dist"
|
||||||
target: "/www/wwwroot/183.230.235.66_11010/property"
|
target: "/www/wwwroot/183.230.235.66_11010/property"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user