Addded working CI/CD pipeline #6
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |