@@ -1,7 +1,7 @@
|
||||
# .gitea/workflows/build.yml
|
||||
|
||||
# 1. 工作流名称
|
||||
name: Build Vue3 App
|
||||
name: 构建项目
|
||||
|
||||
# 2. 触发条件 (on)
|
||||
on:
|
||||
@@ -12,33 +12,33 @@ on:
|
||||
|
||||
# 3. 作业定义 (jobs)
|
||||
jobs:
|
||||
build:
|
||||
构建:
|
||||
# 4. 运行器选择 (runs-on)
|
||||
runs-on: node:18
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
# 5. 步骤序列 (steps)
|
||||
steps:
|
||||
# 步骤 1: 检出代码
|
||||
- name: Checkout code
|
||||
- name: 检出代码
|
||||
uses: actions/checkout@v4
|
||||
|
||||
# 步骤 2: 设置 Node.js 环境
|
||||
- name: Setup Node.js
|
||||
- name: 设置 Node.js 环境
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 18
|
||||
cache: 'npm'
|
||||
|
||||
# 步骤 3: 安装依赖
|
||||
- name: Install dependencies
|
||||
- name: 安装依赖
|
||||
run: npm ci
|
||||
|
||||
# 步骤 4: 执行打包命令
|
||||
- name: Build
|
||||
- name: 执行Build构建
|
||||
run: npm run build
|
||||
|
||||
# 步骤 5: 上传打包产物
|
||||
- name: Upload dist
|
||||
- name: 上传构建产物
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: dist
|
||||
|
||||
Reference in New Issue
Block a user