From 6328b8dbb1896757aa6c70636d6be8c2e0acdd9d Mon Sep 17 00:00:00 2001 From: pigeon Date: Thu, 4 Jun 2026 05:44:00 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E6=B7=BB=E5=8A=A0=20Gitea=20CI/CD=20?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E5=92=8C=20Issue=20=E6=A8=A1=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 创建 .gitea/workflows/frontend-build.yml(前端构建工作流) - 创建 .gitea/issue_templates/(Bug 报告、功能需求模板) - 配置 Gitea Actions 自动化构建 --- .gitea/issue_templates/bug_report.md | 36 +++++++++++ .gitea/issue_templates/feature_request.md | 32 +++++++++ .gitea/workflows/frontend-build.yml | 68 ++++++++++++++++++++ .idea/.gitignore | 10 +++ .idea/inspectionProfiles/Project_Default.xml | 5 ++ .idea/misc.xml | 8 +++ 6 files changed, 159 insertions(+) create mode 100644 .gitea/issue_templates/bug_report.md create mode 100644 .gitea/issue_templates/feature_request.md create mode 100644 .gitea/workflows/frontend-build.yml create mode 100644 .idea/.gitignore create mode 100644 .idea/inspectionProfiles/Project_Default.xml create mode 100644 .idea/misc.xml diff --git a/.gitea/issue_templates/bug_report.md b/.gitea/issue_templates/bug_report.md new file mode 100644 index 0000000..c00df91 --- /dev/null +++ b/.gitea/issue_templates/bug_report.md @@ -0,0 +1,36 @@ +--- +name: 前端 Bug 报告 +title: "[BUG] " +labels: ["bug"] +about: 报告前端页面或组件的问题 +--- + +## 问题描述 + +清晰描述问题现象 + +## 复现步骤 + +1. 进入 xxx 页面 +2. 点击 xxx 按钮 +3. 出现 xxx 错误 + +## 期望结果 + +描述正确的行为 + +## 实际结果 + +描述实际出现的问题 + +## 环境信息 + +- **浏览器**:Chrome / Firefox / Safari / Edge +- **分辨率**:1920x1080 / 移动端 +- **项目**:admin-ui / cashier-mobile / customer-mobile + +## 截图 + +如有截图请粘贴 + +## 备注 diff --git a/.gitea/issue_templates/feature_request.md b/.gitea/issue_templates/feature_request.md new file mode 100644 index 0000000..caf258c --- /dev/null +++ b/.gitea/issue_templates/feature_request.md @@ -0,0 +1,32 @@ +--- +name: 功能需求 +title: "[FEATURE] " +labels: ["feature"] +about: 提出新的功能需求 +--- + +## 需求描述 + +描述需要什么功能 + +## 使用场景 + +描述这个功能的使用场景 + +## 期望实现 + +描述期望的实现方式 + +## 优先级 + +- [ ] P0 - 阻塞 +- [ ] P1 - 高 +- [ ] P2 - 中 +- [ ] P3 - 低 + +## 关联需求 + +- 需要后端接口支持:[创建 API-REQ Issue] +- 相关设计稿: + +## 备注 diff --git a/.gitea/workflows/frontend-build.yml b/.gitea/workflows/frontend-build.yml new file mode 100644 index 0000000..76ef4ed --- /dev/null +++ b/.gitea/workflows/frontend-build.yml @@ -0,0 +1,68 @@ +name: 前端构建与部署 + +on: + push: + branches: [main, develop, 'feature/**'] + paths: + - 'admin-ui/**' + - 'cashier-mobile/**' + - 'customer-mobile/**' + - 'package.json' + - 'pnpm-workspace.yaml' + pull_request: + branches: [main, develop] + +jobs: + build-admin-ui: + runs-on: ubuntu-latest + + steps: + - name: 检出代码 + uses: actions/checkout@v4 + + - name: 设置 Node.js + uses: actions/setup-node@v4 + with: + node-version: '18' + + - name: 安装 pnpm + uses: pnpm/action-setup@v2 + with: + version: 8 + + - name: 安装依赖 + run: pnpm install + + - name: 类型检查 + run: pnpm type-check + + - name: 构建管理后台 + run: pnpm build:admin + + - name: 构建收银端 + run: pnpm build:cashier + + - name: 上传构建产物 + uses: actions/upload-artifact@v4 + with: + name: admin-ui-dist + path: admin-ui/dist + retention-days: 7 + + deploy: + needs: build-admin-ui + runs-on: ubuntu-latest + if: github.ref == 'refs/heads/main' + + steps: + - name: 下载构建产物 + uses: actions/download-artifact@v4 + with: + name: admin-ui-dist + path: dist + + - name: 部署到服务器 + run: | + echo "部署脚本待配置" + echo "可以通过 rsync/ssh 部署到 nginx 目录" + # rsync -avz dist/ user@server:/var/www/html/ diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..f6906f2 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,10 @@ +# 默认忽略的文件 +/shelf/ +/workspace.xml +# 基于编辑器的 HTTP 客户端请求 +/httpRequests/ +# 已忽略包含查询文件的默认文件夹 +/queries/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..8d66637 --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..4738e18 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,8 @@ + + + + + \ No newline at end of file