Astro 5 static site for afriendlywave.com — a landing page with a Mixcloud show grid and audio player widget. Deployed to Cloudflare Workers.
Requires Node.js 22+ and pnpm.
pnpm install # Install dependencies
pnpm dev # Start dev server at localhost:4321
pnpm build # Build production site to ./dist/
pnpm preview # Preview production build locallyA Cloudflare Worker (workers/mixcloud-poller/) automatically detects new Mixcloud uploads and triggers a site rebuild so the show grid stays current.
- Cron trigger — The worker runs on a cron schedule (every 30 minutes) via Cloudflare's scheduled events.
- Fetch latest show — It calls the Mixcloud API (
/afriendlywave/cloudcasts/?limit=1) to get the most recent upload. - Compare with stored key — The last-seen show key is persisted in Cloudflare KV. If the latest key matches, the worker exits early.
- Dispatch rebuild — When a new show is detected, the worker calls the GitHub Actions API to dispatch the
rebuild.ymlworkflow, passing the show name and key as inputs. - Update KV — Only after a successful dispatch does it update the stored key, so a failed dispatch will be retried on the next run.
The Rebuild and Deploy Site workflow can be triggered by the poller or manually via workflow_dispatch. It checks out the repo, installs dependencies with pnpm, runs astro build (which fetches the latest shows from the Mixcloud API at build time), and deploys the output to Cloudflare using wrangler.
pnpm poller:dev # Run the worker locally with wrangler dev
pnpm poller:deploy # Deploy the worker to CloudflareThe worker requires these secrets (set via wrangler secret put):
GITHUB_TOKEN— A GitHub personal access token withactions:writescope for dispatching workflows.
It also uses a KV namespace (POLLER_KV) configured in workers/mixcloud-poller/wrangler.jsonc.
- Per-show dynamic routes (can pull tracklists if we have the patience for that?)
- Tag routes that collect similar shows