From 1f3af89ace685f810655ba225949a13fbaca8d91 Mon Sep 17 00:00:00 2001 From: Brendan Date: Thu, 17 Sep 2026 15:37:48 +0000 Subject: [PATCH] feat: deploy marketing site to Cloudflare Pages --- .github/workflows/deploy.yml | 2 ++ docs/marketing-app.md | 10 +++++++--- package.json | 1 + packages/marketing/package.json | 5 +++-- packages/marketing/public/index.html | 21 +++++++++++++++++++++ packages/marketing/wrangler.jsonc | 1 + 6 files changed, 35 insertions(+), 5 deletions(-) create mode 100644 packages/marketing/public/index.html diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 328255ba..8cd77654 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -14,6 +14,8 @@ concurrency: cancel-in-progress: false jobs: + # The marketing site is connected to Cloudflare Pages and deploys from main + # automatically. This job remains responsible for the stateful app Worker. deploy: name: Deploy app Worker runs-on: ubuntu-latest diff --git a/docs/marketing-app.md b/docs/marketing-app.md index f58aea7b..4648c109 100644 --- a/docs/marketing-app.md +++ b/docs/marketing-app.md @@ -1,10 +1,14 @@ # Marketing site and app -Factorize is deployed as two Cloudflare Workers: +Factorize is deployed as a Cloudflare Pages site and an app Worker: -- `packages/marketing` owns the public landing page at `https://factorize.sh`. It contains no authenticated APIs or tenant data. Set `APP_ORIGIN` to the app origin so login and Create a Job links always cross to the app. +- `packages/marketing` owns the public landing page at `https://factorize.sh`. It is a static Cloudflare Pages project named `factorize-marketing`; its production branch is `main` and its output directory is `packages/marketing/public`. It contains no authenticated APIs or tenant data. Login and Create a Job links cross to `https://app.factorize.sh`. - `packages/app` owns the authenticated dashboard, OAuth callbacks, API/MCP endpoints, provider webhooks, and job deep links at `https://app.factorize.sh`. Its `/` route is the signed-out login entry point and redirects signed-in users to `/jobs`. -Run the two Workers independently with `npm run dev` and `npm run dev:marketing`. Deploy the complete setup with `npm run deploy`; deploy only the public site with `npm run deploy:marketing`. +The Pages project is connected to `GenerationSoftware/factorize` and automatically deploys production from `main`. Preview deployments are created for pull requests. For a manual deployment, authenticate Wrangler and run `npm run deploy:marketing`; this uploads `packages/marketing/public` to the `factorize-marketing` project. + +Run the app Worker locally with `npm run dev`. To preview the marketing package's Worker fallback locally, use `npm run dev:marketing`. + +The Pages custom domain is `factorize.sh`. Cloudflare manages HTTPS and redirects HTTP to HTTPS. The apex DNS record is proxied to Pages; the existing proxied `app.factorize.sh` record is retained unchanged. Configure the Linear OAuth callback and provider webhooks against the app origin, never the marketing origin. Existing `/jobs/*`, `/api/*`, `/mcp`, `/authorize`, and webhook URLs remain app routes. diff --git a/package.json b/package.json index 68e4d9ff..2cea1b06 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "scripts": { "dev": "npm run dev --workspace=factorize", "dev:marketing": "npm run dev --workspace=factorize-marketing", + "build:marketing": "npm run build:marketing --workspace=factorize-marketing", "build:css": "npm run build:css --workspace=factorize", "test": "npm run test --workspaces --if-present", "check": "npm run check --workspace=factorize && npm run check --workspace=factorize-marketing && npm run check --workspace=factorize-tail-relay", diff --git a/packages/marketing/package.json b/packages/marketing/package.json index 23879671..3221ac98 100644 --- a/packages/marketing/package.json +++ b/packages/marketing/package.json @@ -5,8 +5,9 @@ "type": "module", "scripts": { "dev": "wrangler dev", - "check": "tsc --noEmit && wrangler deploy --dry-run", - "deploy": "wrangler deploy" + "build:marketing": "node -e \"console.log('Static marketing assets are ready')\"", + "check": "tsc --noEmit", + "deploy": "wrangler pages deploy public --project-name factorize-marketing" }, "dependencies": { "hono": "^4.11.4" }, "devDependencies": { "@cloudflare/workers-types": "^5.20260910.1", "typescript": "^5.9.3", "wrangler": "^4.44.0" } diff --git a/packages/marketing/public/index.html b/packages/marketing/public/index.html new file mode 100644 index 00000000..407e3710 --- /dev/null +++ b/packages/marketing/public/index.html @@ -0,0 +1,21 @@ + + + + + + Factorize: Software Factories for Everybody + + + + +
+
+

Linear โ†’ Exe.dev โ†’ Herdr

+

No-code Software Factories

+

Create a multiplayer software factory with Linear, Exe.dev and Herdr.

+ +

How it works

Choose when to fully automate

Factorize routes Linear issues to your coding agent of choice running on your exe.dev VM.

  1. Plan work in LinearDefine bugs, features, and product work as Linear issues.
  2. Issues are routed to agentsFactorize listens to Linear and sends issues to agents on your VM.
  3. Watch, guide, or take overConnect to the VM and steer agents together with your colleagues.
+
+ + + diff --git a/packages/marketing/wrangler.jsonc b/packages/marketing/wrangler.jsonc index 255ff761..87e3a870 100644 --- a/packages/marketing/wrangler.jsonc +++ b/packages/marketing/wrangler.jsonc @@ -2,6 +2,7 @@ "$schema": "../../node_modules/wrangler/config-schema.json", "name": "factorize-marketing", "main": "src/index.ts", + "pages_build_output_dir": "./public", "compatibility_date": "2026-09-10", "assets": { "directory": "./public", "binding": "ASSETS" }, "vars": { "APP_ORIGIN": "https://app.factorize.sh" }