Skip to content

πŸš€ chore: add Github Actions workflow for deploy #2

πŸš€ chore: add Github Actions workflow for deploy

πŸš€ chore: add Github Actions workflow for deploy #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 }}" == "push" ]; then
npx vercel deploy --prod --token=$VERCEL_TOKEN --confirm
else
npx vercel deploy --pre --token=$VERCEL_TOKEN --confirm
fi