admin-vben5/.gitea/workflows/dev.yml
bichangxiong 3d1681e811
Some checks failed
/ Explore-Gitea-Actions (push) Failing after 8m41s
更新 .gitea/workflows/dev.yml
2025-08-20 15:11:14 +08:00

49 lines
1.4 KiB
YAML

run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
on:
push:
branches:
- master
jobs:
Explore-Gitea-Actions:
runs-on: ubuntu
steps:
- name: 拉取代码仓库
uses: http://git.missmoc.top/mocheng/checkout@v4
- name: Set up Node.js
uses: http://git.missmoc.top/mocheng/setup-node@v3
with:
node-version: 20.x
- name: 安装pnpm
run: npm i pnpm -g
- name: 安装依赖
run: pnpm install
continue-on-error: false # 依赖安装失败则终止工作流
- name: 构建项目
run: pnpm build:antd
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
with:
host: 127.0.0.1
username: ${{ secrets.SERVER_NAME }} # 使用secrets存储
password: ${{ secrets.SERVER_PWD }} # 使用secrets存储
port: 11001
source: "./apps/web-antd/dist"
target: "/www/wwwroot/183.230.235.66_11010/property"