Files
xueyefenxi-web/.gitea/workflows/npm-build-on-push.yaml
wangbin d2bd0a60a4
Some checks failed
huaian-screen / build (push) Has been cancelled
first commit
2025-10-27 23:54:39 +08:00

35 lines
1014 B
YAML

## 工作流名称
name: huaian-screen
## 工作流触发时机
on: [ push ]
env:
VERSION: $(echo '${{ github.event.head_commit.message }}' | sed -n 's/.*release(\([^)]*\)).*/\1/p')
DOMAIN_NAME: ts-official.tmp.tieshengkeji.cn
FLODER_NAME: huaian
jobs:
## 任务名称
build:
## 任务执行的服务器
runs-on: tiesheng-local
if: ${{ startsWith(github.event.head_commit.message,'release') }}
## 任务步骤
steps:
## 检出代码(固定配置)
- name: Check out repository code
uses: https://git.tieshengkeji.com/actions/checkout@v4
## 下载前端依赖
- name: Install Dependencies
run: npm install
## 前端项目打包并发送到本地
- name: Build Frontend
run: |
npm run build
rm -rf /usr/local/nginx/html/${{env.DOMAIN_NAME}}/static/${{env.FLODER_NAME}}
mv dist "${{env.FLODER_NAME}}"
mv ${{env.FLODER_NAME}} /usr/local/nginx/html/${{env.DOMAIN_NAME}}/static