Skip to content

Cloudflare deployment action#328

Closed
kentcdodds wants to merge 1 commit intomainfrom
cursor/cloudflare-deployment-action-d3c7
Closed

Cloudflare deployment action#328
kentcdodds wants to merge 1 commit intomainfrom
cursor/cloudflare-deployment-action-d3c7

Conversation

@kentcdodds
Copy link
Copy Markdown
Owner

@kentcdodds kentcdodds commented Mar 10, 2026

Add a GitHub Actions workflow to deploy the Create React App to Cloudflare Pages.

Open in Web Open in Cursor 

Summary by CodeRabbit

  • Chores
    • Automated deployment pipeline to Cloudflare Pages enabled for main branch updates and manual triggers.

Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
@cursor
Copy link
Copy Markdown

cursor Bot commented Mar 10, 2026

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 10, 2026

📝 Walkthrough

Walkthrough

A GitHub Actions workflow is added to automate deployment to Cloudflare Pages. The workflow triggers on pushes to the main branch or manual dispatch, executing steps to checkout code, set up Node.js, install dependencies, build the application, and deploy using Cloudflare's wrangler action.

Changes

Cohort / File(s) Summary
GitHub Actions Deployment Workflow
.github/workflows/deploy-to-cloudflare.yml
Adds a new workflow file that automates deployment to Cloudflare Pages, including checkout, Node.js setup, npm install, build execution, and deployment via wrangler-action with Cloudflare credentials and project configuration.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 To Cloudflare Pages, the code now flies,
With workflows and wrangler beneath the skies,
When main gets a push, it's up in a flash,
Automated deploys—no more manual dash! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Cloudflare deployment action' accurately describes the main change: addition of a GitHub Actions workflow for deploying to Cloudflare Pages.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch cursor/cloudflare-deployment-action-d3c7

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.

@kentcdodds kentcdodds marked this pull request as ready for review March 10, 2026 21:59
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
.github/workflows/deploy-to-cloudflare.yml (1)

9-11: Consider adding concurrency control to prevent parallel deployments.

Multiple simultaneous deployments to the same branch can cause race conditions or inconsistent states. Adding a concurrency group ensures only one deployment runs at a time per branch.

♻️ Proposed fix to add concurrency control
 jobs:
   deploy:
     runs-on: ubuntu-latest
+    concurrency:
+      group: deploy-${{ github.ref }}
+      cancel-in-progress: true
     steps:
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/deploy-to-cloudflare.yml around lines 9 - 11, The deploy
job currently allows parallel runs; add a concurrency configuration to the
deploy job to prevent simultaneous deployments (use the job key deploy and the
jobs.deploy.concurrency property) by defining a unique group (e.g. based on
branch or workflow + branch like using github.ref or github.workflow +
github.ref) and set cancel-in-progress: true to ensure only one deployment per
branch runs at a time; update the jobs.deploy block to include this concurrency
stanza.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In @.github/workflows/deploy-to-cloudflare.yml:
- Around line 9-11: The deploy job currently allows parallel runs; add a
concurrency configuration to the deploy job to prevent simultaneous deployments
(use the job key deploy and the jobs.deploy.concurrency property) by defining a
unique group (e.g. based on branch or workflow + branch like using github.ref or
github.workflow + github.ref) and set cancel-in-progress: true to ensure only
one deployment per branch runs at a time; update the jobs.deploy block to
include this concurrency stanza.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 712ee1bb-cec0-4816-a018-eb4810f8a82a

📥 Commits

Reviewing files that changed from the base of the PR and between 32e9e87 and 28733bd.

📒 Files selected for processing (1)
  • .github/workflows/deploy-to-cloudflare.yml

@kentcdodds
Copy link
Copy Markdown
Owner Author

Luckily I can handle all of this from cloudflare's side with pages and don't need code for this :)

@kentcdodds kentcdodds closed this Mar 10, 2026
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.

2 participants