Skip to content
Source
Sign inSign up
fuko/trytanstackdb.com

Deploy v2 to v2.trytanstackdb.com with cf from TanStack Source CI #100002 (GitHub #52)

Mergedfukomerged 2 commits intov2 fromdeploy-v2-subdomainmerged by fuko View on GitHub

fukocommented

Deploys v2 as its own Cloudflare worker on https://v2.trytanstackdb.com. Each merge into v2 deploys again from TanStack Source CI.

Changes

  • Moves from wrangler to cf. cf migrate replaced wrangler.jsonc with cloudflare.config.ts. @cloudflare/vite-plugin is pinned to 2.0.0-beta.v.12, the v2 beta that cf needs, and wrangler is removed. pnpm run deploy now runs cf deploy.
  • Adds a worker and domain. The worker is trytanstackdb-v2, on the Cloudflare account that owns the trytanstackdb.com zone (accountId is pinned), with v2.trytanstackdb.com as its custom domain.
  • Adds a route for v2.trytanstackdb.com/*. Without it, v1's *.trytanstackdb.com/* route kept serving v1 on the subdomain, even with the custom domain in place.
  • Adds .source/workflows/ci.ts.
    • check runs vp check and vp test on every pull request into v2 and on every push to v2.
    • deploy runs cf deploy on pushes to v2, after check passes. It uses the CLOUDFLARE_API_TOKEN CI secret, which is already set and sent only to api.cloudflare.com.
  • Excludes .source/ from lint and type checking. The workflow imports @tanstack-source/ci, which the forge runner provides. It isn't on npm.

Notes

  • v2.trytanstackdb.com is already live from a manual cf deploy. The apex domain still serves v1.
  • This PR's own CI run will probably fail at pnpm install. A PR run takes its network access from the base branch, and v2 has no workflow yet. The first full check-and-deploy runs after the merge.
  • The API token has no DNS: Edit permission on the zone. If the first CI deploy fails at the custom-domain step, add that permission.

🤖 Generated with Claude Code

    1. Important

      Review skipped

      Auto reviews are disabled on base/target branches other than the default branch.

      Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

      Run configuration

      • Source mode: Auto
      • Repository: Unavailable
      • Branch: Unavailable
      • File: No configuration file from this repository applied
      • Commit: Unavailable
      • Layers: defaults
      • Review profile: CHILL
      • Plan: Advanced
      • Run ID: 889f976a-3960-4b76-b7e5-98f1cf90523d

      You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

      Use the checkbox below for a quick retry:

      • Trigger review
      • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

      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

    2. fuko merged thisa030d2b

    3. fuko merged thisa030d2b

    4. fuko closed this

Sign in to join this conversation.