Skip to content

Commit

Permalink
Update deploy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
appujet authored Oct 8, 2024
1 parent 54eb1ef commit 60dc8a4
Showing 1 changed file with 25 additions and 16 deletions.
41 changes: 25 additions & 16 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,33 @@
name: Deploy to Vercel on Release
name: Vercel Production Deployment

env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}

on:
release:
types: [created] # Triggers the workflow when a release is created
types: [created]

jobs:
deploy:
Deploy-Production:
runs-on: ubuntu-latest

steps:
- name: Checkout Code
uses: actions/checkout@v4

- name: Install Vercel CLI
run: npm install -g vercel

- name: Deploy to Vercel
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} # Vercel token for authentication
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} # Your Vercel project ID
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} # Your Vercel organization ID (if applicable)
run: vercel --prod --yes

# Checkout the repository code
- uses: actions/checkout@v2

# Install the latest version of Vercel CLI
- name: Install Vercel CLI
run: npm install --global vercel@latest

# Pull Vercel environment information for production
- name: Pull Vercel Environment Information
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}

# Build the project
- name: Build Project Artifacts
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}

# Deploy the project using the prebuilt artifacts
- name: Deploy Project Artifacts to Vercel
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}

0 comments on commit 60dc8a4

Please sign in to comment.