Skip to content

Commit 396e1da

Browse files
author
DogInfantry
committed
ci: add Vercel deploy workflow + deploy instructions for dashboard
- GitHub Actions workflow: auto-deploys dashboard/ on push to main - DEPLOY.md: step-by-step Vercel import guide (Option 1: dashboard, Option 2: CI) - .gitignore: exclude .vercel/ directory
1 parent 917d6c5 commit 396e1da

3 files changed

Lines changed: 71 additions & 0 deletions

File tree

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Deploy Dashboard to Vercel
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
paths:
7+
- 'dashboard/**'
8+
- '.github/workflows/deploy-dashboard.yml'
9+
10+
jobs:
11+
deploy:
12+
runs-on: ubuntu-latest
13+
environment:
14+
name: production
15+
url: ${{ steps.deploy.outputs.preview-url }}
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Setup Node.js
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: '20'
24+
cache: 'npm'
25+
cache-dependency-path: dashboard/package-lock.json
26+
27+
- name: Install Vercel CLI
28+
run: npm install --global vercel@latest
29+
30+
- name: Pull Vercel Environment Information
31+
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
32+
working-directory: ./dashboard
33+
34+
- name: Build Project Artifacts
35+
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
36+
working-directory: ./dashboard
37+
38+
- name: Deploy Project Artifacts to Vercel
39+
id: deploy
40+
run: |
41+
url=$(vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }})
42+
echo "preview-url=$url" >> $GITHUB_OUTPUT
43+
echo "Deployed to: $url"
44+
working-directory: ./dashboard

dashboard/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
node_modules/
22
.next/
33
.env*.local
4+
.vercel/

dashboard/DEPLOY.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Deploying Capital Markets Intelligence Dashboard
2+
3+
## Option 1: Vercel Dashboard (Recommended — 2 minutes)
4+
5+
1. Go to [vercel.com/new](https://vercel.com/new)
6+
2. Click **"Add New Project"**
7+
3. Import `DogInfantry/capital-markets-intelligence` from GitHub
8+
4. Set **Root Directory**`dashboard`
9+
5. Framework: **Next.js** (auto-detected)
10+
6. Click **Deploy** → done
11+
12+
## Option 2: GitHub Actions (Auto-deploy on every push)
13+
14+
Add these secrets to your GitHub repo (`Settings → Secrets → Actions`):
15+
16+
| Secret | Value |
17+
|--------|-------|
18+
| `VERCEL_TOKEN` | Personal access token from vercel.com/account/tokens |
19+
| `VERCEL_ORG_ID` | `team_4pgfqRkIU2W9etJoOiEwg250` |
20+
| `VERCEL_PROJECT_ID` | Project ID after first deploy |
21+
22+
The workflow `.github/workflows/deploy-dashboard.yml` runs automatically on push to `main`.
23+
24+
## Environment
25+
26+
No environment variables required. All data is served from `/public/data/` at build time.

0 commit comments

Comments
 (0)