Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 31 additions & 17 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,44 @@
name: deploy
name: Deploy to Vercel

on:
push:
branches:
- main
- stage
pull_request:
branches:
- main
- stage
types: [opened, synchronize, reopened]

permissions:
deployments: write
pull-requests: write
branches: [main, stage]

jobs:
deploy:
deploy-production:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Deploy to Vercel (Production)
uses: mountainash/deploy-to-vercel-action@v2.5.0
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
PRODUCTION: true
ALIAS_DOMAINS: eatda.net
GITHUB_DEPLOYMENT: true
GITHUB_DEPLOYMENT_ENV: Production

deploy-preview:
if: github.ref == 'refs/heads/stage'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Checkout
uses: actions/checkout@v4

- uses: mountainash/deploy-to-vercel-action@v2.5.0
- name: Deploy to Vercel (Preview)
uses: mountainash/deploy-to-vercel-action@v2.5.0
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
PRODUCTION: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
PRODUCTION: false
ALIAS_DOMAINS: dev.eatda.net
GITHUB_DEPLOYMENT: true
GITHUB_DEPLOYMENT_ENV: Preview