Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: Deploy Frontend to Vercel
name: "Dev Deploy to Vercel: Admin App Frontend"

on:
push:
branches: [ main ]
paths:
- 'admin-wcc-app/**'
- '.github/workflows/deploy-frontend.yml'
- '.github/workflows/deploy-admin-frontend-dev.yml'

jobs:
deploy:
Expand All @@ -32,13 +32,12 @@ jobs:
NEXT_PUBLIC_API_KEY: ${{ secrets.NEXT_PUBLIC_API_KEY }}
NEXT_PUBLIC_APP_URL: ${{ secrets.NEXT_PUBLIC_APP_URL }}

- name: Deploy to Vercel
- name: Deploy to Vercel (Dev)
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 }}
working-directory: ./admin-wcc-app
vercel-args: '--prod'
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
40 changes: 40 additions & 0 deletions .github/workflows/deploy-admin-frontend-prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: "Prod Deploy to Vercel: Admin App Frontend"

on:
workflow_dispatch:

jobs:
deploy:
runs-on: ubuntu-latest
defaults:
run:
working-directory: admin-wcc-app
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Install dependencies
run: npm ci

- name: Build
run: npm run build
env:
NEXT_PUBLIC_API_BASE: ${{ secrets.NEXT_PUBLIC_API_BASE_PROD }}
NEXT_PUBLIC_API_KEY: ${{ secrets.NEXT_PUBLIC_API_KEY_PROD }}
NEXT_PUBLIC_APP_URL: ${{ secrets.NEXT_PUBLIC_APP_URL_PROD }}

- name: Deploy to Vercel (Prod)
uses: amondnet/vercel-action@v25
with:
vercel-token: ${{ secrets.VERCEL_TOKEN_PROD }}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID_PROD }}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID_PROD }}
working-directory: ./admin-wcc-app
vercel-args: '--prod'
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN_PROD }}
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ Required for frontend (see `.env.example`):
- `NEXT_PUBLIC_APP_URL` - Frontend URL (e.g., `https://dev-wcc-admin.vercel.app`)

**GitHub Actions Deployment:**
Automated deployment via `.github/workflows/deploy-frontend.yml`:
Automated deployment via `.github/workflows/deploy-admin-frontend-dev.yml`:
- Triggers on push to `main` branch when `admin-wcc-app/**` files change
- Requires GitHub secrets:
- `VERCEL_TOKEN` - Vercel API token
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -344,8 +344,7 @@ avoid CORS issues.

### CI/CD and deploy (Vercel)

A GitHub Actions workflow is provided at `.github/workflows/deploy-frontend.yml` to deploy the
frontend to Vercel on pushes to `main`. Configure the following repository secrets:
A GitHub Actions workflow is provided at `.github/workflows/deploy-admin-frontend-dev.yml` to deploy the frontend to Vercel Dev environment on pushes to `main`. Configure the following repository secrets:

- VERCEL_TOKEN
- VERCEL_ORG_ID
Expand Down
Loading