Skip to content

知了 Cicada · 任何会议和直播的实时字幕、同声传译、AI 会议纪要,Mac、Windows、Linux、Android 免费开源。Live subtitles, interpreting and meeting notes for any call or stream, on Mac, Windows, Linux and Android.

build: deploy the website to the cicada-site Worker with one script

wquguru2096793505b7
diff --git a/AGENTS.md b/AGENTS.md
index a3d51dc..dbf170f 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -38,6 +38,7 @@ scripts/build.sh && open build/Cicada.app # dev build: own bundle id, settings
RELEASE=1 scripts/build.sh # release build
scripts/package.sh # DMG + zip + checksums
scripts/release.sh <x.y.z> # needs a dated CHANGELOG section; CI publishes the tag
+scripts/deploy-site.sh # build the site, wrangler deploy to the cicada-site Worker (cicada.indaloop.app)
```
## Verifying
diff --git a/scripts/deploy-site.sh b/scripts/deploy-site.sh
new file mode 100755
index 0000000..e104439
--- /dev/null
+++ b/scripts/deploy-site.sh
@@ -0,0 +1,20 @@
+#!/usr/bin/env bash
+# Builds the website and deploys it to the Cloudflare Worker "cicada-site" (static assets only), which
+# serves cicada.indaloop.app. The custom domain is attached to the Worker in Cloudflare, so the config
+# below declares no routes and a deploy leaves it alone. Needs `wrangler login` once.
+# (.github/workflows/pages.yml deploys to GitHub Pages instead, but skips while the repo is private.)
+set -euo pipefail
+cd "$(dirname "$0")/.."
+
+python3 scripts/site.py
+CONFIG=$(mktemp -d)
+trap 'rm -rf "$CONFIG"' EXIT
+cat > "$CONFIG/wrangler.jsonc" <<JSON
+{
+ "name": "cicada-site",
+ "compatibility_date": "2026-10-01",
+ "assets": { "directory": "$PWD/build/site", "html_handling": "auto-trailing-slash" }
+}
+JSON
+(cd "$CONFIG" && wrangler deploy --config wrangler.jsonc)
+curl -fsS -o /dev/null "https://cicada.indaloop.app/?deployed=$(date +%s)" && echo "Live: https://cicada.indaloop.app/"