chore: repo overall update #23
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 版本 | |
# 安装 pnpm | |
- name: Install pnpm | |
run: npm install -g pnpm | |
# 安装依赖 | |
- name: Install dependencies | |
run: pnpm install | |
# 运行构建命令 | |
- name: Build Vite project | |
run: pnpm run build:report | |
test: | |
timeout-minutes: 60 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
- name: Install dependencies | |
run: npm i -g pnpm && pnpm install | |
- name: Install Playwright Browsers | |
run: npx playwright install --with-deps | |
- name: Run Playwright tests | |
run: npx playwright test |