Skip to content

chore: VERCEL 배포 연동 #2

chore: VERCEL 배포 연동

chore: VERCEL 배포 연동 #2

Workflow file for this run

name: Deploy to Vercel
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install dependencies
run: npm install
- name: Build project
run: npm run build
- name: Deploy to Vercel
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
run: |
if [ "${{ github.event_name }}" == "pull_request" ]; then
npx vercel deploy --yes --token=$VERCEL_TOKEN --target=preview
else
npx vercel deploy --yes --token=$VERCEL_TOKEN --target=production
fi