Skip to content

Commit e2d6c6a

Browse files
committed
ops: add staging enviroment (#101)
1 parent b7cf409 commit e2d6c6a

File tree

5 files changed

+77
-5
lines changed

5 files changed

+77
-5
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
name: convex
1+
name: convex (prod)
22

33
on:
44
push:
55
branches:
6-
- main
6+
- prod
77
paths:
88
- "packages/server/**"
99

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: convex (staging)
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- "packages/server/**"
9+
10+
jobs:
11+
deploy:
12+
runs-on: ubuntu-latest
13+
defaults:
14+
run:
15+
working-directory: ./packages/server
16+
environment: deploy-convex-staging
17+
env:
18+
DOPPLER_TOKEN: ${{ secrets.DOPPLER_TOKEN }}
19+
CONVEX_DEPLOY_KEY: ${{ secrets.CONVEX_DEPLOY_KEY }}
20+
21+
steps:
22+
- name: 💾 Checkout code
23+
uses: actions/checkout@v4
24+
25+
- name: 📦 Setup bun
26+
uses: oven-sh/setup-bun@v2
27+
28+
- name: 📦 Install dependencies
29+
run: bun install
30+
31+
- name: 🔑 Install Doppler CLI
32+
uses: dopplerhq/cli-action@v3
33+
34+
- name: 🔄 Sync environment variables to Convex
35+
run: |
36+
doppler secrets download --no-file --format env-no-quotes | \
37+
while IFS='=' read -r key value; do
38+
bunx convex env set "$key" "$value"
39+
done
40+
41+
- name: 🚀 Deploy Convex
42+
run: bunx convex deploy
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
name: web
1+
name: web (prod)
22

33
on:
44
push:
55
branches:
6-
- main
6+
- prod
77
paths:
88
- "apps/web/**"
99
- "packages/server/**"

.github/workflows/web-staging.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: web (staging)
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- "apps/web/**"
9+
- "packages/server/**"
10+
11+
jobs:
12+
deploy:
13+
runs-on: ubuntu-latest
14+
environment: deploy-web-staging
15+
env:
16+
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
17+
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
18+
19+
steps:
20+
- name: 💾 Checkout code
21+
uses: actions/checkout@v4
22+
23+
- name: 📦 Setup bun
24+
uses: oven-sh/setup-bun@v2
25+
26+
- name: 📦 Install Vercel CLI
27+
run: bun add --global vercel@latest
28+
29+
- name: 🚀 Deploy Project to Vercel
30+
run: vercel deploy --prod --token=${{ secrets.VERCEL_TOKEN }}

.vercelignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
apps/chrome
1+
apps/browser
22
apps/scraper

0 commit comments

Comments
 (0)