forked from wangziqi/gongxue-base
feat: 移除 Docker 部署,添加 Gitea CI/CD workflows
- 删除 docker-compose.yml、Dockerfile、.dockerignore、docker/ 目录 - 更新 deploy.sh:移除 Docker Compose MySQL 启动,改为 systemd 检查 - 新增 .gitea/workflows/deploy.yml:手动触发、rsync + SSH + PM2 部署 - 新增 .gitea/workflows/ci.yml:PR lint + typecheck + test 自动检查
This commit is contained in:
40
.gitea/workflows/ci.yml
Normal file
40
.gitea/workflows/ci.yml
Normal file
@@ -0,0 +1,40 @@
|
||||
# PR 自动检查:代码风格 + 类型检查 + 测试
|
||||
name: CI 检查
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [main]
|
||||
push:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '22'
|
||||
- run: npm ci
|
||||
- run: npm run lint
|
||||
|
||||
typecheck:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '22'
|
||||
- run: npm ci
|
||||
- run: npm run typecheck
|
||||
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [lint, typecheck]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '22'
|
||||
- run: npm ci
|
||||
- run: npm run test
|
||||
Reference in New Issue
Block a user