feat(setup): scaffold cloudflare-workers deploys (classify + .forgejo deploy workflow) #28

Merged
gmackie merged 1 commit from feat/setup-cf-workers into main 2026-06-26 18:58:24 +00:00
Owner

Part 3 of fixing deploy confusion. forge setup classified k8s/vercel/docker/nix only and never scaffolded a deploy pipeline for Cloudflare Workers apps — users had to hand-write .forgejo/workflows/deploy.yml, so most never got one.

  • Detect wrangler config (wrangler.toml/.jsonc/.json, anywhere incl. monorepo subdirs) in repo inspection (HasWrangler).
  • Classify it as a new cloudflare-workers deployment kind (strong signal).
  • Scaffold a Cloudflare Workers deploy workflow (deployCloudflareWorkersTemplate) — on push to main it installs, finds the wrangler config (monorepo-aware, matching the agent fix in #27), builds, and wrangler deploys using the CLOUDFLARE_API_TOKEN secret. CI template maps to the Node/pnpm static template (not nix).

Unit test for the new classification; agent builds, vets, full cmd/fg/commands suite passes.

Follow-ups: auto-create+link a Forgejo repo for every app (keystone creation side), and clean up linear-clone.

🤖 Generated with Claude Code

Part 3 of fixing deploy confusion. `forge setup` classified k8s/vercel/docker/nix only and never scaffolded a deploy pipeline for Cloudflare Workers apps — users had to hand-write `.forgejo/workflows/deploy.yml`, so most never got one. - **Detect** wrangler config (`wrangler.toml/.jsonc/.json`, anywhere incl. monorepo subdirs) in repo inspection (`HasWrangler`). - **Classify** it as a new `cloudflare-workers` deployment kind (strong signal). - **Scaffold** a Cloudflare Workers deploy workflow (`deployCloudflareWorkersTemplate`) — on push to main it installs, finds the wrangler config (monorepo-aware, matching the agent fix in #27), builds, and `wrangler deploy`s using the `CLOUDFLARE_API_TOKEN` secret. CI template maps to the Node/pnpm static template (not nix). Unit test for the new classification; agent builds, vets, full `cmd/fg/commands` suite passes. Follow-ups: auto-create+link a Forgejo repo for every app (keystone creation side), and clean up linear-clone. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
feat(setup): scaffold cloudflare-workers deploy (.forgejo workflow + classify + validate)
Some checks failed
AI Code Review / review (pull_request) Failing after 9s
CI / ci (pull_request) Successful in 16m14s
390a54c527
Sign in to join this conversation.
No description provided.