Skip to content

Addded working CI/CD pipeline #6

Addded working CI/CD pipeline

Addded working CI/CD pipeline #6

name: Frontend Preview Deployment
on:
pull_request:
branches: [ main, develop ]
paths:
- 'frontend/**'
jobs:
preview:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
- name: Install dependencies
working-directory: ./frontend
run: npm ci
- name: Run linting
working-directory: ./frontend
run: npm run lint:check
- name: Build application
working-directory: ./frontend
run: npm run build
- name: Install Vercel CLI
run: npm install --global vercel@latest
- name: Deploy Preview to Vercel
working-directory: ./frontend
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
run: |
vercel --token=$VERCEL_TOKEN --confirm