Add one-click deploy (Vercel + Cloudflare) and VITE_SITE_URL - #2
Merged
Conversation
Add a "Deploy with Vercel" button to the README and a vercel.json so the clone flow builds cleanly: output points at the prerendered dist/client, framework null to avoid the SPA rewrite and use the root 404.html. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Replace the hardcoded SITE_URL with the VITE_SITE_URL env var (fallback https://example.com, trailing slash stripped). On Vercel, default it to the project's production domain so the Deploy button yields correct canonical/OG URLs with no config. Add .env.example and gitignore local .env files. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add a "Deploy to Cloudflare" (Workers) button and wrangler.jsonc — an assets-only Worker serving dist/client with 404-page handling. Document all deploy targets in a new Deploy section, including manual Cloudflare Pages setup (the one-click button is Workers-only). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Move each deploy button onto its own line under a per-provider subsection (Vercel, Cloudflare Workers, Cloudflare Pages) so the differently sized button badges no longer sit misaligned side by side. Replace the stacked buttons at the top with a pointer to the Deploy section. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Put the Vercel and Cloudflare Workers buttons near the top of the README, stacked vertically under provider labels so they read clearly and don't misalign. The Deploy section keeps the config details and Cloudflare Pages setup, referencing the buttons above. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Make the template one-click deployable and drive the site origin from an env var.
Changes
vercel.jsonsetsoutputDirectory: dist/clientandframework: null(static, no SPA rewrite; root404.htmlhandles misses).wrangler.jsoncis an assets-only Worker (no server code) servingdist/clientwithnot_found_handling: "404-page".## Deploysection (manual "Connect to Git" — Cloudflare's deploy button is Workers-only, and its Pages config field can't coexist with the Workersassetsblock).SITE_URLnow readsVITE_SITE_URL(fallbackhttps://example.com, trailing slash stripped). On Vercel it defaults to the project's production domain viavite.config.ts, so the button yields correct canonical/OG URLs with no config. Added.env.exampleand gitignored local.envfiles.Build command (
pnpm build) and publish dir (dist/client) are the same across all three targets.Notes
pnpm build+ type-check pass; output resolves to theexample.comfallback with no real domain baked intodist.🤖 Generated with Claude Code