Skip to content

Commit 07e61f9

Browse files
committed
build(cd): seperate convex from web deployment
1 parent 68fa0d8 commit 07e61f9

7 files changed

Lines changed: 50 additions & 10 deletions

File tree

.github/workflows/convex.yaml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: convex
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
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+
cd packages/server
37+
doppler secrets download --no-file --format env-no-quotes | \
38+
while IFS='=' read -r key value; do
39+
bunx convex env set "$key" "$value"
40+
done
41+
42+
- name: 🚀 Deploy Convex
43+
run: bunx convex deploy

.vercelignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
apps/chrome
2+
apps/scraper

apps/web/bun.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/web/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"check": "biome check",
1111
"check:types": "tsc --noEmit"
1212
},
13+
"packageManager": "bun@1.2.23",
1314
"dependencies": {
1415
"@clerk/nextjs": "^6.33.3",
1516
"@dev-team-fall-25/server": "workspace:*",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"engines": {
1616
"node": ">=20"
1717
},
18-
"packageManager": "bun@1.2.22",
18+
"packageManager": "bun@1.2.23",
1919
"workspaces": [
2020
"apps/*",
2121
"packages/*"

turbo.json

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,7 @@
11
{
22
"$schema": "https://turborepo.com/schema.json",
33
"ui": "tui",
4-
"globalEnv": [
5-
"NEXT_PUBLIC_CONVEX_URL",
6-
"NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY",
7-
"CONVEX_DEPLOYMENT",
8-
"CONVEX_DEPLOY_KEY",
9-
"CLERK_SECRET_KEY",
10-
"CLERK_JWT_ISSUER_DOMAIN"
11-
],
4+
"envMode": "loose",
125
"tasks": {
136
"build": {
147
"dependsOn": ["^build"],

vercel.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"framework": "nextjs",
3-
"buildCommand": "cd ./packages/server && npx convex deploy --cmd 'cd ../../apps/web && turbo run build' --cmd-url-env-var-name NEXT_PUBLIC_CONVEX_URL",
3+
"buildCommand": "cd ./packages/server && bunx convex deploy --cmd 'cd ../../apps/web && turbo run build' --cmd-url-env-var-name NEXT_PUBLIC_CONVEX_URL",
44
"outputDirectory": "apps/web/.next"
55
}

0 commit comments

Comments
 (0)