# DEPLOY STATUS — AS OF 2026-05-16, CYCLE 85

## TL;DR

**The repo is 69 cycles ahead of what's on automatescale.com.** All your new pages
(K6 comparison cluster, 25 enriched case studies, 9 blog posts, motion system,
83-entry search, PWA manifest, form-capture pipeline with mailto fallback, etc.)
exist in `AutomateScale/automatescale-site` main but are **NOT being deployed**.

Live site is serving an older origin (Cloudflare-proxied Google Frontend, not
this repo).

**Fastest unlock: ~3 minutes in the Cloudflare dashboard — no API tokens, no
GitHub Actions config, no secrets management.**

---

## 🚀 Fastest unlock — CF Pages dashboard integration (RECOMMENDED, ~3 min)

This bypasses the GitHub Actions workflow entirely. CF Pages connects directly
to the repo, builds on every push to main, no secrets needed.

1. **dash.cloudflare.com → Pages → "Create a project" → "Connect to Git"**
2. **Authorize Cloudflare's GitHub app** (you'll grant access to
   `AutomateScale/automatescale-site` only)
3. **Select the repo**, branch `main`
4. **Build settings:**
   - Framework preset: **None**
   - Build command: *(leave empty)*
   - Build output directory: `/`
5. **Save and Deploy.** First deploy takes ~30 seconds.
6. **Bind your domain:** Pages project → Custom Domains → add `automatescale.com`.
   CF auto-updates DNS routing.

After step 5, every git push to main auto-deploys. After step 6,
`automatescale.com` serves the new build.

Then in the same Pages project → Settings → Environment Variables, add:
- `RESEND_API_KEY` (required for forms to actually deliver)
- `RESEND_AUDIENCE_ID` (optional — newsletter/playbook subscribers auto-added)
- `GHL_API_KEY` + `GHL_SPEAKING_PIPELINE_ID` (optional — Task #3 ships)
- `PLAYBOOK_PDF_URL` (optional — Task #4 ships)

---

## Why this is better than the GitHub Actions path

The repo has `.github/workflows/deploy.yml` with 3 deploy jobs, all gated on
unset repo-variables + missing secrets. The dashboard-integration path
above sidesteps all of that — CF Pages owns the build pipeline itself.

The Actions workflow can stay dormant (or you can delete `.github/workflows/`
later if you don't want the dead config sitting there).

---

## Alternative — keep the Actions path (5 min, requires CF API token)

If you prefer to keep the deploy pipeline in GitHub Actions (e.g. for
audit-log reasons), use the path below.

**Step 1** — Create a Cloudflare API token:
- Go to https://dash.cloudflare.com/profile/api-tokens
- Click "Create Token" → "Edit Cloudflare Workers" template (or custom with
  `Account.Cloudflare Pages.Edit` permission on your account)
- Copy the token

**Step 2** — Find your CF account ID:
- Top-right of any CF dashboard page, or
- `https://dash.cloudflare.com/<ACCOUNT_ID>/...` in the URL

**Step 3** — Set 2 secrets + 1 variable in GitHub
(repo: `AutomateScale/automatescale-site` → Settings → Secrets and variables → Actions):

```
Secret: CLOUDFLARE_API_TOKEN     = <token from step 1>
Secret: CLOUDFLARE_ACCOUNT_ID    = <account id from step 2>
Variable: DEPLOY_CLOUDFLARE       = true
```

**Step 4** — Manually trigger the workflow once:
```
gh workflow run Deploy --repo AutomateScale/automatescale-site
```

Or any push to main will do it automatically. First run creates the
`automatescale-site` CF Pages project if it doesn't exist.

**Step 5** — Bind your custom domain in CF Pages:
- CF dashboard → Pages → `automatescale-site` → Custom Domains → add `automatescale.com`
- CF auto-updates the DNS

---

## Alternative: Firebase Hosting (10-15 min)

Higher ceiling but more setup. From Cycle 49 we know the CLI hit 403 on
`firebase hosting:sites:create` — the project either doesn't exist or Adam
lacks Owner role.

Required in this order:
1. Create the project at https://console.firebase.google.com/ named `automatescale-site`
2. Add `adam@automatescale.com` as Owner (or use existing if already)
3. Run `firebase hosting:sites:create automatescale-site` from any auth'd machine
4. Set up GitHub Workload Identity Federation for keyless auth, OR
5. Create a Firebase service account JSON, base64-encode it, set as
   `FIREBASE_SERVICE_ACCOUNT` secret
6. Set `DEPLOY_FIREBASE=true` variable
7. Migrate DNS from current Cloudflare origin to Firebase Hosting custom domain

---

## What changes the moment deploy unlocks

The first successful deploy ships **62 cycles of work** to production in one
build:

- Hero redesign with motion (gear deck, mesh, magnetic CTA, brand-trust marquee)
- 25 enriched case studies + motion + LCP optimization
- 6-page comparison cluster (HubSpot, ClickFunnels, Keap, ActiveCampaign,
  Pipedrive, Zoho) interlinked K6
- 8 enriched blog posts with related-grids
- 8 agent pages with related-grids
- New pages: FAQ, ROI calculator, funnel-audit-quiz (9Q scored), comparison hub
- PWA manifest, security.txt, 404 page, sitemap (80+ URLs), Cmd+K search (81 entries)
- Forms fully wired through `/api/lead` Cloudflare Function
- Core Web Vitals: width/height on all 329 imgs, fetchpriority/preload on 32 LCP
  pages, decoding=async sitewide, lazy-load on 171 imgs
- All hub/spoke internal-linking (case-studies → siblings, blog → siblings,
  agents → siblings, comparisons → siblings)

---

## Why this doc exists

The /15-min /loop cycles have been silently expanding the repo for ~16 hours.
Every cycle improves something real. None of it reaches users until step 1-5
above is done. This is the single biggest unlock.

— Cycle 78, archon
