Skip to content

Deploy to Vercel

Deploy to Vercel #1

name: Deploy to Vercel
on:
workflow_dispatch:
jobs:
deploy:
name: Deploy Next.js App to Vercel
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install pnpm
run: npm install -g pnpm
- name: Install dependencies with pnpm
run: pnpm install --frozen-lockfile
- name: Build Next.js app
working-directory: apps/web # Adjust this path to where your Next.js app is located
run: npx turbo build
- name: Install Vercel CLI
run: npm install -g vercel
- name: Deploy to Vercel
working-directory: apps/web # Adjust this path to where your Next.js app is located
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} # Add your Vercel token in GitHub Secrets
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} # Optional: Add Org ID if needed
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} # Optional: Add Project ID if needed
run: vercel --prod --token $VERCEL_TOKEN