Skip to content

fix(ci): add DATABASE_URL to deploy-api and parallelize deploys - #331

Merged
saddlepaddle merged 1 commit into
mainfrom
fix/prod-deploy-env
Dec 12, 2025
Merged

saddlepaddle merged 1 commit into
mainfrom
fix/prod-deploy-env

Conversation

@saddlepaddle

@saddlepaddle saddlepaddle commented Dec 12, 2025 •

Copy link
Copy Markdown
Collaborator

Summary

  • Add missing DATABASE_URL and DATABASE_URL_UNPOOLED to deploy-api job
  • Change deploy-web to depend on deploy-database instead of deploy-api (parallelize)

Test plan

  • Production deploy succeeds for all apps

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Updated deployment workflow configuration to enhance database integration and dependency management.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai

coderabbitai Bot commented Dec 12, 2025 •

Copy link
Copy Markdown
Contributor

Walkthrough

Added database environment variables (DATABASE_URL and DATABASE_URL_UNPOOLED) to the API build step in the production deployment workflow. Modified the "Deploy Web to Vercel" job dependency to require the database deployment step instead of the API deployment step.

Changes

Cohort / File(s) Summary
GitHub Actions Workflow
\.github/workflows/deploy-production\.yml
Added DATABASE_URL and DATABASE_URL_UNPOOLED environment variables to the "Build and Deploy API" step; changed job dependency for "Deploy Web to Vercel" from deploy-api to deploy-database

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

  • Environment variable additions to a single workflow step
  • Job dependency change is straightforward and localized
  • Verify that the new database environment variables are correctly named and available in the CI environment context
  • Confirm the dependency change aligns with intended deployment sequencing

Poem

🐰 Database first, then web takes flight,
URLs pooled for speeds so right,
Dependencies rearranged with care,
Production deploys through the air! ✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description check ⚠️ Warning The description lacks required template sections including Type of Change, Related Issues, and proper Testing section completion; appears to be a minimal custom format instead of the repository template. Update the description to follow the repository template structure by adding Type of Change (mark as 'Bug fix'), Related Issues section, and properly document the testing requirements.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main changes: adding DATABASE_URL variables and parallelizing deploys by adjusting job dependencies.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/prod-deploy-env

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3edeca8 and 3371238.

📒 Files selected for processing (1)
  • .github/workflows/deploy-production.yml (2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: Deploy Web
  • GitHub Check: Deploy Docs
  • GitHub Check: Deploy Marketing
  • GitHub Check: Deploy Admin
  • GitHub Check: Deploy API
  • GitHub Check: Build
🔇 Additional comments (2)
.github/workflows/deploy-production.yml (2)

71-72: Confirm the DATABASE_URL secrets are configured in production environment.

Adding the DATABASE_URL and DATABASE_URL_UNPOOLED environment variables to the API build is consistent with the existing setup in deploy-web (lines 113-114) and deploy-admin (lines 194-195), which suggests this is the right approach.

However, ensure that both secrets are properly configured in your GitHub repository's production environment to avoid build failures.


85-85: Dependency change enables parallelization—verify it's safe in production.

Changing deploy-web to depend on deploy-database instead of deploy-api enables both jobs to run concurrently, reducing total workflow time. The change appears safe since deploy-web only needs the database migrations to complete; it communicates with the API at runtime, not at build time.

Run the production deployment to confirm that deploy-api and deploy-web execute in parallel without conflicts or race conditions.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

github-actions Bot commented Dec 12, 2025 •

Copy link
Copy Markdown
Contributor

🧹 Preview Cleanup Complete

The following preview resources have been cleaned up:

Service Status
Database (Neon) ✅

Thank you for your contribution! 🎉


Preview resources have been processed for cleanup

This branch was previously deployed

1 inactive deployment
preview — 3371238a Deployed Dec 12, 2025 by saddlepaddle via Deploy Marketing #187
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant