Skip to content

Make frontend CI generic for template repo #22

Make frontend CI generic for template repo

Make frontend CI generic for template repo #22

Workflow file for this run

name: Frontend CI & Deploy (Vercel)
on: [push, pull_request]
jobs:
build-frontend:
runs-on: ubuntu-latest
# Removed defaults: run: working-directory: client
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
# Run commands in root, with fallback to prevent failures in template repo
- run: npm install || echo "No package.json found, skipping npm install"
- run: npm run lint || echo "No lint script found, skipping lint"
- run: npm run build || echo "No build script found, skipping build"
deploy-vercel:
runs-on: ubuntu-latest
needs: build-frontend
steps:
- uses: amondnet/vercel-action@v25
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
# Removed working-directory: ./client