Compare commits
24 Commits
f842dcaf14
...
qianpw-mxg
| Author | SHA1 | Date | |
|---|---|---|---|
| 945f795f81 | |||
| bf7d0b3bc5 | |||
| cb7b22bca3 | |||
| d5a795de77 | |||
| 6a3aa3bf5d | |||
| 4ad3706dfa | |||
| 44426d8812 | |||
| c970931954 | |||
| ba1a7f392b | |||
| 16bb5afaa7 | |||
| 22ef893529 | |||
| 066cee46b0 | |||
| b4017597f9 | |||
| f27fc56fd4 | |||
| 47623d6b1e | |||
| 7426746239 | |||
| ecbd4eefd7 | |||
| 448531f9d3 | |||
| 4facb02777 | |||
| 929cb1966b | |||
| aa2f07de41 | |||
| 5c8cb3bc88 | |||
| bbdcef9d56 | |||
| c4f3235fcf |
46
.gitea/workflows/deploy.yml
Normal file
46
.gitea/workflows/deploy.yml
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
name: Auto Deploy
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- wuxichen # 当前分支
|
||||||
|
- main
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-and-deploy:
|
||||||
|
runs-on: self-hosted
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Build and Deploy
|
||||||
|
run: |
|
||||||
|
# 使用持久化工作目录,避免每次重新克隆
|
||||||
|
WORK_DIR="/root/tashow-deploy"
|
||||||
|
|
||||||
|
# 首次运行时克隆代码
|
||||||
|
if [ ! -d "$WORK_DIR" ]; then
|
||||||
|
echo "首次部署,克隆代码..."
|
||||||
|
git clone http://gitea.tashowz.com/tashow/tashow-manager.git $WORK_DIR
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd $WORK_DIR
|
||||||
|
|
||||||
|
# 更新代码到最新版本
|
||||||
|
echo "更新代码..."
|
||||||
|
git fetch origin
|
||||||
|
git checkout ${{ github.ref_name }}
|
||||||
|
git reset --hard origin/${{ github.ref_name }}
|
||||||
|
|
||||||
|
# 安装依赖
|
||||||
|
echo "安装依赖..."
|
||||||
|
pnpm install
|
||||||
|
|
||||||
|
# 构建项目
|
||||||
|
echo "构建项目..."
|
||||||
|
pnpm build
|
||||||
|
|
||||||
|
# 部署到服务器
|
||||||
|
echo "部署到服务器..."
|
||||||
|
rsync -av --delete dist/ /home/1panel/www/sites/admin.petshy.tashowz.com/index/
|
||||||
|
|
||||||
|
echo "部署成功!"
|
||||||
2
public/test.txt
Normal file
2
public/test.txt
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
CI/CD Test - Deployed at 2026-03-02 16:23
|
||||||
|
This file is used to verify automatic deployment is working.
|
||||||
@@ -41,8 +41,8 @@ export const baseDeptColumns: ProColumns<AiModelRespVO>[] = [
|
|||||||
) => (
|
) => (
|
||||||
<Switch
|
<Switch
|
||||||
checked={record.status === 1}
|
checked={record.status === 1}
|
||||||
checkedChildren="禁用"
|
checkedChildren="启用"
|
||||||
unCheckedChildren="启用"
|
unCheckedChildren="禁用"
|
||||||
onChange={(checked) => {
|
onChange={(checked) => {
|
||||||
Modal.confirm({
|
Modal.confirm({
|
||||||
title: '确认操作',
|
title: '确认操作',
|
||||||
|
|||||||
Reference in New Issue
Block a user