Skip to content

Add vercel build

Add vercel build #1

Workflow file for this run

name: Deploy Next.js App
on:
push:
branches:
- test
jobs:
build:
runs-on: ubuntu-latest
steps:
# Step 1: Checkout code
- name: Checkout code
uses: actions/checkout@v3
# Step 2: Setup Node.js
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18 # Change to your Node.js version
cache: 'npm'
# Step 3: Install dependencies
- name: Install dependencies
run: npm install
# Step 4: Build the app
- name: Build Next.js app
run: npm run build
# Step 5: Deploy to Vercel (Optional)
- name: Deploy to Vercel
uses: amondnet/[email protected]
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-org-id: ${{ vars.VERCEL_ORG_ID }}
vercel-project-id: ${{ vars.VERCEL_PROJECT_ID }}
working-directory: ./
vercel-args: '--prod'