From 2bd3459524cb83456cb3aed9f21662ac62ca3215 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BD=97=E6=BE=9C=E5=A4=A7=E5=B8=85=E5=93=A5?= Date: Mon, 30 Jun 2025 22:18:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9Eaction?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflow/action | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .gitea/workflow/action diff --git a/.gitea/workflow/action b/.gitea/workflow/action new file mode 100644 index 0000000..cc8d879 --- /dev/null +++ b/.gitea/workflow/action @@ -0,0 +1,31 @@ +name: Build Vue Project + +on: + push: + branches: [ main ] # 主分支推送时触发 + pull_request: # 开启PR时触发构建 + branches: [ main ] + + jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: '18' # 指定Node版本 + + - name: Install dependencies + run: npm ci # 更安全的依赖安装 + + - name: Build project + run: npm run build # 执行构建命令 + + - name: Upload build artifacts + uses: actions/upload-artifact@v3 + with: + name: dist # 产物名称 + path: dist # 构建输出的目录,Vue项目默认是dist \ No newline at end of file