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
10 changes: 8 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ jobs:
name: PR validation
runs-on: ubuntu-latest

# ADD THIS ENV BLOCK HERE:
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
DATABASE_URL_UNPOOLED: ${{ secrets.DATABASE_URL_UNPOOLED }}

steps:
- name: Checkout repository
uses: actions/checkout@v7.0.1
Expand All @@ -44,11 +49,12 @@ jobs:
- name: Type check
run: npx tsc --noEmit

# Add unit tests here if applicable:
# Add unit tests here when you make them:
# - name: Run tests
# run: npm test

- name: Production build
if: github.event_name == 'push'
run: npm run build

db-smoke:
Expand All @@ -58,7 +64,7 @@ jobs:

env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
DIRECT_URL: ${{ secrets.DIRECT_URL }}
DATABASE_URL_UNPOOLED: ${{ secrets.DATABASE_URL_UNPOOLED }}

steps:
- name: Checkout repository
Expand Down
33 changes: 17 additions & 16 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@
"dev": "next dev",
"build": "npx prisma generate && prisma migrate deploy && next build",
"start": "next start",
"postinstall": "prisma generate",
"lint": "eslint"
},
"dependencies": {
"@aws-sdk/client-s3": "^3.1073.0",
"@aws-sdk/s3-request-presigner": "^3.1073.0",
"@clerk/nextjs": "^7.5.3",
"dotenv": "17.4.2",
"@neondatabase/serverless": "^1.1.0",
"@prisma/adapter-neon": "^7.8.0",
"@prisma/client": "^7.8.0",
Expand Down
5 changes: 4 additions & 1 deletion prisma.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ export default defineConfig({
path: "prisma/migrations",
},
datasource: {
url: process.env["DATABASE_URL"],
url:
process.env.DATABASE_URL_UNPOOLED ??
process.env.DATABASE_URL ??
"postgresql://postgres:postgres@localhost:5432/postgres"
},
});
2 changes: 1 addition & 1 deletion src/app/api/webhooks/clerk/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export async function POST(req: Request) {
}

const body = await req.text();
const webhookSecret = process.env.CLERK_WEBHOOK_SECRET; // CHANGE DURING DEV TO WEBHOOK_SECRET
const webhookSecret = process.env.CLERK_WEBHOOK_SECRET; // Have the dev CLERK_WEBHOOK_SECRET (not prod) in your .env.local

if (!webhookSecret) {
console.error("CRITICAL ERROR: CLERK_WEBHOOK_SECRET is not loaded in process.env!");
Expand Down