deploy guide

Deploy to Webflow Cloud

Webflow Cloud docs

prerequisites

1 · push neuromast/ to your own GitHub repo

If you forked Axol, skip to step 2 — your fork is already on GitHub. Otherwise, seed a fresh repo with just the neuromast/ tree:

cp -r neuromast /tmp/my-neuromast
cd /tmp/my-neuromast
git init -b main
git add .
git commit -m "seed neuromast"
gh repo create my-neuromast --private --source=. --push

Private is fine — Webflow Cloud's GitHub App reads private repos you grant it access to. The only env vars in the repo are placeholder shapes; real secrets never get committed.

2 · create the Webflow Cloud project

  1. Open the Webflow Cloud dashboard

    Your site's Designer → Webflow Cloud (left nav, near the bottom) → New project.

  2. Connect your GitHub repo

    Click Connect GitHub and authorize Webflow's GitHub App for the repo you just pushed. The dashboard will list the repo; select it and pick the branch to deploy (typically main).

    If you seeded a fresh repo with just the neuromast/ contents, leave Root directory blank. If you forked the whole Axol repo, set Root directory to neuromast so Webflow builds from there and ignores the macOS app code.

  3. Set the mount path

    Mount path: /app — must match base: '/app' in astro.config.mjs. All API routes live under <site>.webflow.io/app/api/… as a result.

  4. Set environment variables

    Before the first deploy runs, add these in Environments → Variables (mark each as secret):

    • POLL_TOKEN — bearer the local forwarder uses for /pull + /ack. Generate with openssl rand -hex 32.
    • SHARED_SECRET (optional) — query-key fallback for senders that can't sign HMAC. Same command.
    • HOOK_SCHEME_<SOURCE> + HOOK_SECRET_<SOURCE> per signed source (e.g. HOOK_SCHEME_GITHUB=github, HOOK_SECRET_GITHUB=<your-repo-webhook-secret>).
  5. Trigger the first deploy

    Webflow Cloud kicks off a deploy as soon as the repo is connected. Watch the Deployments tab — the first run builds the Astro bundle, auto-provisions the QUEUE KV namespace, and registers the /app mount.

    When the dashboard shows Environment URL: Needs deployment, the worker built fine but the Webflow site hasn't been republished to expose the mount. Click Publish on the site (Designer → Publish) — the Environment URL flips to https://<your-site>.webflow.io/app.

  6. Probe the endpoints

    export AXOL_CLOUD_URL=https://<your-site>.webflow.io
    export POLL_TOKEN='the-bearer-you-set'
    export SHARED_SECRET='the-shared-key-you-set'
    
    curl -X POST "$AXOL_CLOUD_URL/app/api/hooks/smoke?key=$SHARED_SECRET" \
      -H 'content-type: application/json' \
      -d '{"title":"hello","body":"from the cloud"}'
    
    curl -H "Authorization: Bearer $POLL_TOKEN" "$AXOL_CLOUD_URL/app/api/pull"

    Expect 204 on the POST and a JSON body with your item on the GET. 401 on either means a mismatched env var — fix in the dashboard, then re-push or wait for the variable change to pick up on the next deploy.

3 · connect the local forwarder

  1. Install the forwarder

    With the cloud side live, wire up the bash + launchd forwarder on the machine running Axol. From the repo root:

    AXOL_CLOUD_URL="$AXOL_CLOUD_URL" \
    AXOL_POLL_TOKEN="$POLL_TOKEN" \
    ./lateral-line/install.sh

    The installer renders a launchd plist with absolute paths and your env, drops it in ~/Library/LaunchAgents/, and loads it. Idempotent — re-run any time a token rotates.

  2. End-to-end test

    With Axol running and the forwarder loaded:

    curl -X POST "$AXOL_CLOUD_URL/app/api/hooks/demo?key=$SHARED_SECRET" \
      -H 'content-type: application/json' \
      -d '{"title":"remote alert","body":"delivered by the lateral line"}'

    Within 15 seconds a speech bubble pops on your screen. tail -f ~/Library/Logs/Axol/lateral-line.log shows the pull → forward → ack cycle.

day-2 operations

Redeploying

Every subsequent code change is just:

git push

Webflow Cloud watches the connected branch and kicks off a new deploy automatically. The Deployments tab shows the build log per commit; rollback is git revert and push again.

Env var changes take effect on the next deploy — edit in the dashboard, then either push an unrelated commit or click Redeploy on the latest deployment.

Emergency manual deploy (CLI fallback)

If GitHub is down or you need to test an unpushed branch:

npm install -g @webflow/webflow-cli
cd neuromast
webflow cloud deploy --mount /app --auto-publish

Requires running webflow cloud init once beforehand to authenticate and link to the site. Subsequent pushes to the connected GitHub branch will overwrite whatever the CLI deployed.

Rotating secrets

If POLL_TOKEN, SHARED_SECRET, or an HMAC secret leaks:

  1. Webflow dashboard → Environments → Variables → edit → click Redeploy on the latest deployment (or push an empty commit to trigger).
  2. For POLL_TOKEN: re-run lateral-line/install.sh locally with the new value to regenerate the launchd plist.
  3. For webhook HMAC secrets: update the sender's webhook config to match (rotation lives in each sender's own UI — GitHub repo settings, Stripe dashboard, etc.).

troubleshooting