Skip to content

Commit eb1d723

Browse files
author
TARS
committed
chore: 简化 CI/CD,部署由 Vercel 自动处理
1 parent 74300b8 commit eb1d723

1 file changed

Lines changed: 3 additions & 38 deletions

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
name: CI/CD
1+
name: CI
22

33
on:
44
push:
5-
branches: [main, master]
5+
branches: [master]
66
pull_request:
7-
branches: [main, master]
7+
branches: [master]
88

99
jobs:
1010
build:
@@ -28,38 +28,3 @@ jobs:
2828

2929
- name: Build
3030
run: npm run build
31-
32-
# Vercel 部署(生产环境)
33-
deploy-production:
34-
runs-on: ubuntu-latest
35-
needs: build
36-
if: github.ref == 'refs/heads/main'
37-
38-
steps:
39-
- name: Checkout code
40-
uses: actions/checkout@v4
41-
42-
- name: Deploy to Vercel (Production)
43-
uses: vercel/action-deploy@v1
44-
with:
45-
vercel-token: ${{ secrets.VERCEL_TOKEN }}
46-
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
47-
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
48-
vercel-args: '--prod'
49-
50-
# Vercel 部署(预览环境)
51-
deploy-preview:
52-
runs-on: ubuntu-latest
53-
needs: build
54-
if: github.ref != 'refs/heads/main'
55-
56-
steps:
57-
- name: Checkout code
58-
uses: actions/checkout@v4
59-
60-
- name: Deploy to Vercel (Preview)
61-
uses: vercel/action-deploy@v1
62-
with:
63-
vercel-token: ${{ secrets.VERCEL_TOKEN }}
64-
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
65-
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}

0 commit comments

Comments
 (0)