Skip to content

chore: repo overall update #1

chore: repo overall update

chore: repo overall update #1

name: Build and Deploy Vite Project
on:
push:
branches:
- dev # 监听主分支的推送事件
jobs:
build:
runs-on: ubuntu-latest
steps:
# 检查代码库
- name: Checkout code
uses: actions/checkout@v3
# 设置 Node.js 环境
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '20' # 根据项目需求选择 Node.js 版本
# 安装依赖
- name: Install dependencies
run: pnpm install
# 运行构建命令
- name: Build Vite project
run: pnpm run build:report && ls
# 保存构建结果到工作空间
# - name: Upload build artifact
# uses: actions/upload-artifact@v3
# with:
# name: build-output
# path: dist/ # 根据 Vite 的默认输出目录
# 如果需要部署,可以添加一个部署步骤,例如使用 GitHub Pages 或其他服务