Skip to content

Commit 7753e05

Browse files
authored
Merge pull request #65 from YAPP-Github/feature/PRODUCT-130
2 parents b90b6ce + 0f1bcf4 commit 7753e05

File tree

1 file changed

+31
-17
lines changed

1 file changed

+31
-17
lines changed

.github/workflows/deploy.yml

Lines changed: 31 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,44 @@
1-
name: deploy
1+
name: Deploy to Vercel
22

33
on:
44
push:
5-
branches:
6-
- main
7-
- stage
8-
pull_request:
9-
branches:
10-
- main
11-
- stage
12-
types: [opened, synchronize, reopened]
13-
14-
permissions:
15-
deployments: write
16-
pull-requests: write
5+
branches: [main, stage]
176

187
jobs:
19-
deploy:
8+
deploy-production:
9+
if: github.ref == 'refs/heads/main'
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v4
14+
15+
- name: Deploy to Vercel (Production)
16+
uses: mountainash/deploy-to-vercel-action@v2.5.0
17+
with:
18+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19+
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
20+
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
21+
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
22+
PRODUCTION: true
23+
ALIAS_DOMAINS: eatda.net
24+
GITHUB_DEPLOYMENT: true
25+
GITHUB_DEPLOYMENT_ENV: Production
26+
27+
deploy-preview:
28+
if: github.ref == 'refs/heads/stage'
2029
runs-on: ubuntu-latest
2130
steps:
22-
- uses: actions/checkout@v4
31+
- name: Checkout
32+
uses: actions/checkout@v4
2333

24-
- uses: mountainash/deploy-to-vercel-action@v2.5.0
34+
- name: Deploy to Vercel (Preview)
35+
uses: mountainash/deploy-to-vercel-action@v2.5.0
2536
with:
2637
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2738
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
2839
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
2940
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
30-
PRODUCTION: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
41+
PRODUCTION: false
42+
ALIAS_DOMAINS: dev.eatda.net
43+
GITHUB_DEPLOYMENT: true
44+
GITHUB_DEPLOYMENT_ENV: Preview

0 commit comments

Comments
 (0)