build构建测试
This commit is contained in:
@@ -1,46 +1,43 @@
|
|||||||
|
|
||||||
# name: 构建项目
|
name: 构建项目
|
||||||
# run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
|
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
|
||||||
|
|
||||||
# # 2. 触发条件 (on)
|
# 2. 触发条件 (on)
|
||||||
# on: [push]
|
on: [push]
|
||||||
|
|
||||||
# # 3. 作业定义 (jobs)
|
# 3. 作业定义 (jobs)
|
||||||
# jobs:
|
jobs:
|
||||||
# 构建:
|
构建:
|
||||||
# # 4. 运行器选择 (runs-on)
|
# 4. 运行器选择 (runs-on)
|
||||||
# runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
# # 5. 步骤序列 (steps)
|
# 5. 步骤序列 (steps)
|
||||||
# steps:
|
steps:
|
||||||
# # 步骤 1: 检出代码
|
# 步骤 1: 检出代码
|
||||||
# - name: 检出代码
|
- name: 检出代码
|
||||||
# uses: https://gitea.com/actions/checkout@v5
|
uses: https://gitea.com/actions/checkout@v4
|
||||||
# with:
|
|
||||||
# github-server-url: 'https://git.bmycode.help'
|
|
||||||
|
|
||||||
|
- name: 显示目录
|
||||||
|
run: ls -la
|
||||||
|
|
||||||
# - name: 显示目录
|
# 步骤 2: 设置 Node.js 环境
|
||||||
# run: ls -la
|
- name: 设置 Node.js 环境
|
||||||
|
uses: https://gitea.com/actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 18
|
||||||
|
cache: 'npm'
|
||||||
|
|
||||||
# # 步骤 2: 设置 Node.js 环境
|
# 步骤 3: 安装依赖
|
||||||
# - name: 设置 Node.js 环境
|
- name: 安装依赖
|
||||||
# uses: https://gitea.com/actions/setup-node@v4
|
run: npm ci
|
||||||
# with:
|
|
||||||
# node-version: 18
|
|
||||||
# cache: 'npm'
|
|
||||||
|
|
||||||
# # 步骤 3: 安装依赖
|
# 步骤 4: 执行打包命令
|
||||||
# - name: 安装依赖
|
- name: 执行Build构建
|
||||||
# run: npm ci
|
run: npm run build
|
||||||
|
|
||||||
# # 步骤 4: 执行打包命令
|
# 步骤 5: 上传打包产物
|
||||||
# - name: 执行Build构建
|
- name: 上传构建产物
|
||||||
# run: npm run build
|
uses: https://gitea.com/actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
# # 步骤 5: 上传打包产物
|
name: dist
|
||||||
# - name: 上传构建产物
|
path: dist/
|
||||||
# uses: https://gitea.com/actions/upload-artifact@v4
|
|
||||||
# with:
|
|
||||||
# name: dist
|
|
||||||
# path: dist/
|
|
||||||
Reference in New Issue
Block a user