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
23 changes: 19 additions & 4 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,22 @@
# When adding additional environment variables, the schema in "/src/env.js"
# should be updated accordingly.

# Example:
# SERVERVAR="foo"
# NEXT_PUBLIC_CLIENTVAR="bar"
GOOGLE_GENERATIVE_AI_API_KEY=""
# Database
# MongoDB connection string (required)
# Example: mongodb+srv://username:password@cluster.mongodb.net/promptr
DATABASE_URL=""

# AI / Google Gemini API
# Get your API key from: https://makersuite.google.com/app/apikey
GOOGLE_GENERATIVE_AI_API_KEY=""

# Authentication (NextAuth.js)
# Generate a secret: openssl rand -base64 32
NEXTAUTH_SECRET=""

# For production deployment, set to your deployed URL
# For local development, use http://localhost:3000
NEXTAUTH_URL="http://localhost:3000"

# Optional: Skip environment validation during build (useful for Docker/CI)
# SKIP_ENV_VALIDATION=true
37 changes: 37 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Deploy to Vercel

on:
push:
branches:
- main
pull_request:
branches:
- main

env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'npm'

- name: Install Vercel CLI
run: npm install --global vercel@latest

- name: Pull Vercel Environment Information
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}

- name: Build Project Artifacts
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}

- name: Deploy Project Artifacts to Vercel
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}
31 changes: 31 additions & 0 deletions .vercelignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Dependencies
node_modules
.pnp
.pnp.js

# Testing
coverage

# Production
/build

# Misc
.DS_Store
*.pem

# Debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

# Local env files
.env
.env*.local

# Prisma
prisma/*.db
prisma/*.db-journal

# Turbo
.turbo
Loading
Loading