This commit is contained in:
28
.gitea/workflows/ci.yml
Normal file
28
.gitea/workflows/ci.yml
Normal file
@ -0,0 +1,28 @@
|
||||
name: Node.js CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
build-and-test:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: 检出代码
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: 设置 Node.js
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '21' # 可改为 16/20 等版本
|
||||
cache: 'npm'
|
||||
|
||||
- name: 安装依赖
|
||||
run: npm install
|
||||
|
||||
- name: 构建项目(可选)
|
||||
run: npm run build
|
||||
if: success()
|
Reference in New Issue
Block a user