Central build system for Chobble sites. Client repos push content; this repo merges it with the Chobble Template and deploys the static site.
Client Repo (push)
│
▼
Bunny Edge Script (webhook relay)
│
▼
GitHub repository_dispatch → This Repo
│
├── Pulls client content
├── Pulls template
├── Merges + builds (Eleventy)
└── Deploys to Bunny Storage
- Security: Build logic lives only in this repo — client users can't modify workflows
- Multi-tenant: One builder serves many client sites
- Edge relay: Bunny Edge Script validates webhooks before triggering builds
A client repo (e.g. chobble-client) pushes markdown, images, etc.
GitHub sends a webhook to the Bunny Edge Script relay, which:
- Validates the HMAC signature
- Calls the GitHub API to trigger
repository_dispatchon this repo
The sync-and-build.yml workflow:
- Checks out this builder repo
- Fetches the client repo content
- Fetches the Chobble Template
- Merges them via
scripts/ci-merge.js - Builds with Eleventy (via Bun)
- Deploys to Bunny Storage (staging or production based on branch)
Add a webhook in the client repo:
- URL: Your Bunny Edge Script endpoint
- Content type:
application/json - Secret: Shared webhook secret (stored as
WEBHOOK_SECRETin the edge script) - Events: Just the
Pushevent
Deploy edge-script/webhook-relay.ts to Bunny Edge Scripting and set these secrets:
| Secret | Description |
|---|---|
WEBHOOK_SECRET |
HMAC secret shared with client webhooks |
WEBHOOK_SECRET_0 |
Additional client webhook secret (optional) |
GITHUB_PAT |
GitHub PAT with repo scope on this builder repo |
BUILDER_REPO |
This repo as owner/repo (e.g. chobbledotcom/chobble-builder) |
| Secret | Description |
|---|---|
BUNNY_ACCESS_KEY |
Bunny CDN API access key |
BUNNY_PRODUCTION_STORAGE_ZONE_NAME |
Production storage zone |
BUNNY_PRODUCTION_STORAGE_ZONE_PASSWORD |
Production storage password |
BUNNY_PRODUCTION_PULL_ZONE_ID |
Production pull zone ID |
BUNNY_STAGING_STORAGE_ZONE_NAME |
Staging storage zone |
BUNNY_STAGING_STORAGE_ZONE_PASSWORD |
Staging storage password |
BUNNY_STAGING_PULL_ZONE_ID |
Staging pull zone ID |
FORMSPARK_ID |
Formspark form ID (optional) |
BOTPOISON_PUBLIC_KEY |
BotPoison public key (optional) |
NTFY_TOPIC |
ntfy.sh notification topic (optional) |
For local builds you need the template available. Clone it alongside this repo:
git clone https://github.com/chobbledotcom/chobble-template ../chobble-template
bun install
bun run buildOr use the prepare-dev script which clones/updates the template automatically:
bun run prepare-dev
bun run build| Script | Purpose |
|---|---|
scripts/ci-merge.js |
Merges template + client into combined directory |
scripts/build.js |
Local build (prepares dev env + runs Eleventy) |
scripts/prepare-dev.js |
Sets up local dev environment |
scripts/sync-files.js |
Syncs changed files to dev build |
scripts/watch.js |
Watches for file changes |
scripts/serve.js |
Starts local dev server |