Skip to content

🚀 Deploy the application to Vercel #15

🚀 Deploy the application to Vercel

🚀 Deploy the application to Vercel #15

Workflow file for this run

name: 🚀 Deploy the application to Vercel
on: workflow_dispatch
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
jobs:
deploy-Production:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ lts/* ]
steps:
- name: 📥 Checkout code
uses: actions/checkout@v3
- name: 🛠️ Setup Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: 🧹 Clean npm cache and remove node_modules
run: |
npm cache clean --force
rm -rf node_modules package-lock.json
- name: 📦 Install dependencies
run: |
npm install
npm install @rollup/rollup-linux-x64-gnu
- name: ⚡ Install Vercel CLI
run: npm install --global vercel@latest
- name: 🔄 Pull Vercel Environment Information
run: vercel pull --yes --environment=production --token=${{ env.VERCEL_TOKEN }}
- name: 👷 Build Project Artifacts
run: |
export NODE_OPTIONS="--max_old_space_size=4096"
vercel build --prod --token=${{ env.VERCEL_TOKEN }}
- name: 🚀 Deploy Project Artifacts to Vercel
run: vercel deploy --prebuilt --prod --token=${{ env.VERCEL_TOKEN }}