Conversation
- Add GitHub Actions for staging, production, and PR previews. - Move D1 bindings to `nuxt.config.ts` using `$env` overrides. - Create `wrangler.dev.jsonc` for local development. - Update scripts to support environment-aware builds and migrations. - Update documentation for new deployment and database workflows. - Upgrade Bun to 1.3.9 and update various dev dependencies. Establish a robust CI/CD pipeline that handles database migrations and worker versioning. Moving D1 configuration to Nuxt's environment overrides prevents Nitro build conflicts while ensuring the correct database is bound per environment. The split wrangler configuration allows for clean local development without interfering with production build settings.
Wrap long lines of text and adjust whitespace to improve readability. Rename the database section for better consistency and update internal links to prevent broken references. These adjustments make the documentation easier to maintain and read across different platforms.
Remove the emoji from the "D1 Database" header and update internal links. This ensures cleaner anchor navigation and consistent formatting throughout the documentation.
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
affirm | 33a5add | Commit Preview URL Branch Preview URL |
Feb 12 2026, 08:04 PM |
There was a problem hiding this comment.
Pull request overview
Implements a multi-environment Cloudflare Workers deployment setup (production + staging/preview) and refactors D1 configuration so the correct database binding is selected per Nuxt build environment.
Changes:
- Added a new GitHub Actions deployment workflow to deploy/publish production and upload staging/preview worker versions.
- Moved D1 binding configuration into
nuxt.config.tsusing$envoverrides, plus a separatewrangler.dev.jsoncfor local D1 usage. - Updated build/deploy/migration scripts and bumped several dependencies/tooling versions.
Reviewed changes
Copilot reviewed 8 out of 10 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
wrangler.jsonc |
Removes (comments out) D1 bindings from the base Wrangler config. |
wrangler.dev.jsonc |
Introduces a dev-only Wrangler config containing a local D1 binding. |
worker-configuration.d.ts |
Updates Wrangler-generated runtime types; D1 binding type (DB) is removed. |
package.json |
Adds env-specific build/deploy scripts and changes migration commands. |
nuxt.config.ts |
Adds $env overrides for production/staging D1 bindings; points dev config to wrangler.dev.jsonc. |
bun.lock |
Lockfile updates for dependency bumps. |
README.md |
Documents the new D1/env split and deployment workflow; adds deployment badge. |
.trunk/trunk.yaml |
Bumps checkov and trufflehog versions. |
.github/workflows/deploy.yaml |
New workflow for staging/production deploys and PR previews. |
.github/workflows/ci.yaml |
Updates Bun version used in CI. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
Preview version uploaded to affirm worker (staging D1). Version ID: Preview URL available in the Cloudflare dashboard under Workers > affirm > Versions. |
|
Preview version uploaded to affirm worker (staging D1). Version ID: Preview URL available in the Cloudflare dashboard under Workers > affirm > Versions. |
This pull request introduces major improvements to deployment and database configuration, streamlining how the project is built, deployed, and managed across production and staging environments. The highlights include a new CI/CD workflow for automated deployment, clearer separation of environment-specific database bindings, and updated documentation to reflect these changes. Additionally, several dependencies and tools have been updated for improved stability and compatibility.
Deployment & CI/CD improvements:
.github/workflows/deploy.yamlfor automated deployment to staging and production, including preview builds for pull requests. This workflow handles database migrations, builds, uploads, and posts preview URLs as PR comments.package.jsonscripts to support environment-specific builds and deployments (build:staging,deploy:staging), ensuring correct D1 database binding for each environment. [1] [2]Database configuration:
nuxt.config.tsto define D1 database bindings using the$envkey for production and staging, and clarified the separation between local and remote configurations. This prevents duplicate bindings and ensures correct database usage per environment. [1] [2]README.mdwith a new "Database" section, explaining D1 usage, environment configuration, migration workflow, and the rationale for separate config files.Documentation updates:
README.mdto document the new deployment workflow, essential commands, and gotchas, making it easier for developers to understand and use the environment-specific features. [1] [2] [3] [4]Dependency and tool upgrades:
bun,drizzle-kit,wrangler,vue,@nuxt/eslint,@types/node,checkov,trufflehog) for improved stability and compatibility. [1] [2] [3] [4]Deployment & CI/CD
deploy.yaml) for staging, production, and preview environments, including migration, build, upload, and preview URL commenting.package.jsonto support environment-specific operations and correct D1 database binding. [1] [2]Database Configuration
nuxt.config.tsusing$envfor production and staging, and clarified config separation for local and remote environments. [1] [2]README.md, detailing D1 usage, environment config, migration workflow, and config file separation.Documentation
README.mdto reflect new deployment workflow, essential commands, and environment-specific gotchas. [1] [2] [3] [4]Dependency & Tool Updates
bun,drizzle-kit,wrangler,vue,@nuxt/eslint,@types/node,checkov, andtrufflehog. [1] [2] [3] [4]