Skip to content

chore: migrate deployment from Vercel to Cloudflare Workers#38

Open
CryptoFewka wants to merge 5 commits intomainfrom
migrate-to-cloudflare-workers
Open

chore: migrate deployment from Vercel to Cloudflare Workers#38
CryptoFewka wants to merge 5 commits intomainfrom
migrate-to-cloudflare-workers

Conversation

@CryptoFewka
Copy link
Copy Markdown

@CryptoFewka CryptoFewka commented Apr 21, 2026

Summary

  • Adds wrangler.toml to configure a Cloudflare Workers static assets deployment (name: docs, output: .vitepress/dist)
  • Removes vercel.json — no longer needed
  • Removes the push: branches trigger from build.yml — Cloudflare Workers Builds now owns all deployments on main

What's needed before merging

The following manual steps must be completed in the Cloudflare dashboard before this is live:

  1. Connect the repo — Workers & Pages → Create → Connect to Git → select this repo
    • Production branch: main
    • Build command: yarn install && make build
    • Build output directory: .vitepress/dist
  2. Add custom domain — after first successful build, go to the docs Worker → Settings → Domains & Routes → Add Custom Domain → docs.getoptimum.xyz
  3. Update DNS — remove/update the Vercel DNS record for docs.getoptimum.xyz only after confirming the Worker serves the site correctly

PR previews

Once connected, Cloudflare will automatically deploy a preview worker for each PR and post the preview URL as a comment — no GitHub secrets or deploy workflows required.

Test plan

  • Merge to main triggers a Cloudflare build and deployment
  • https://docs.getoptimum.xyz loads correctly after DNS cutover
  • Opening a PR causes Cloudflare to post a preview URL comment
  • build.yml still runs on PRs for CI validation

Summary by CodeRabbit

  • Chores
    • Updated build workflow configuration to trigger only on pull requests and merge group events, removing automatic triggers for direct pushes to main and release branches.

- Add wrangler.toml for Cloudflare Workers static assets deployment
- Remove vercel.json (no longer needed)
- Remove push-to-main trigger from build.yml (Cloudflare Builds owns deployments)
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 21, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Error Error Apr 21, 2026 7:17pm

Request Review

@CryptoFewka CryptoFewka marked this pull request as ready for review April 21, 2026 19:03
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 21, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: getoptimum/coderabbit/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: ab2c8158-f3f9-4a62-bcf4-f04e67314767

📥 Commits

Reviewing files that changed from the base of the PR and between 2807665 and 74597a0.

⛔ Files ignored due to path filters (2)
  • vercel.json is excluded by none and included by none
  • wrangler.toml is excluded by none and included by none
📒 Files selected for processing (1)
  • .github/workflows/build.yml
💤 Files with no reviewable changes (1)
  • .github/workflows/build.yml

📝 Walkthrough

Walkthrough

This change removes the push event trigger from the Build Site GitHub Actions workflow for the main and release/** branches, eliminating four lines of configuration. The workflow now activates exclusively on pull_request and merge_group events, preventing automatic builds from direct commits to these branches while maintaining CI/CD execution for pull requests and merge queue operations.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 9 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Title check ⚠️ Warning The PR title does not include the required domain/package identifier in parentheses as specified by the format requirement. Update the title to follow the format: chore(github): migrate deployment from Vercel to Cloudflare Workers or similar, including the domain/package in parentheses.
✅ Passed checks (9 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Go Build And Test Rationale ✅ Passed Repository is a Node.js/VitePress documentation site without Go code; Go build and test rationale check is not applicable.
Concurrency Safety ✅ Passed Pull request modifies only VitePress documentation configuration files with no concurrent code patterns or shared state concerns present.
Public Api Changes ✅ Passed VitePress documentation site with no public API exports. Package.json lacks main, exports, and types fields. PR changes are infrastructure-related only: GitHub Actions workflows, Vercel removal, and Cloudflare Workers configuration. No public APIs to change.
Security Considerations ✅ Passed The pull request presents no security vulnerabilities; wrangler.toml contains safe configuration, build.yml uses pinned actions with minimal permissions, and the Makefile invokes yarn scripts safely.
Rust Best Practices ✅ Passed Custom Rust best practices check is not applicable; PR contains only configuration files (YAML, TOML) with zero Rust source code.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch migrate-to-cloudflare-workers

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

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Apr 21, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
docs 0c2ba6b Commit Preview URL

Branch Preview URL
Apr 21 2026, 07:18 PM

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