Skip to content

Commit 06104fb

Browse files
Fix CDN deployment docs and release packaging
Drop the unused HIVE_DATA KV requirement from self-host instructions, and package release zips with the existing action-zip path so runners do not need a system zip binary. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent af030c7 commit 06104fb

2 files changed

Lines changed: 30 additions & 15 deletions

File tree

.github/workflows/build-and-dockerize.yaml

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ jobs:
101101
packages/services/cdn-worker/dist/index.lambda.mjs
102102
dest: ${{ inputs.imageTag }}.zip
103103

104-
- name: archive CDN release artifacts
104+
- name: prepare CDN release artifacts
105105
if:
106106
${{ inputs.uploadJavaScriptArtifacts && inputs.publishLatest && github.ref_type == 'tag'
107107
&& github.ref_name == format('hive@{0}', inputs.latestVersion) && matrix.platform ==
@@ -110,8 +110,30 @@ jobs:
110110
mkdir -p release-assets/cloudflare release-assets/lambda
111111
cp packages/services/cdn-worker/dist/index.worker.mjs release-assets/cloudflare/index.mjs
112112
cp packages/services/cdn-worker/dist/index.lambda.mjs release-assets/lambda/index.mjs
113-
(cd release-assets/cloudflare && zip ../hive-cdn-cloudflare-worker.zip index.mjs)
114-
(cd release-assets/lambda && zip ../hive-cdn-aws-lambda.zip index.mjs)
113+
114+
# recursive: true puts directory contents at the zip root (index.mjs), matching the
115+
# Lambda handler `index.handler` and Wrangler `main = "index.mjs"`.
116+
- uses: vimtor/action-zip@5f1c4aa587ea41db1110df6a99981dbe19cee310 # v1
117+
name: archive CDN Cloudflare Worker release artifact
118+
if:
119+
${{ inputs.uploadJavaScriptArtifacts && inputs.publishLatest && github.ref_type == 'tag'
120+
&& github.ref_name == format('hive@{0}', inputs.latestVersion) && matrix.platform ==
121+
'linux/amd64' }}
122+
with:
123+
recursive: true
124+
files: release-assets/cloudflare/
125+
dest: release-assets/hive-cdn-cloudflare-worker.zip
126+
127+
- uses: vimtor/action-zip@5f1c4aa587ea41db1110df6a99981dbe19cee310 # v1
128+
name: archive CDN AWS Lambda release artifact
129+
if:
130+
${{ inputs.uploadJavaScriptArtifacts && inputs.publishLatest && github.ref_type == 'tag'
131+
&& github.ref_name == format('hive@{0}', inputs.latestVersion) && matrix.platform ==
132+
'linux/amd64' }}
133+
with:
134+
recursive: true
135+
files: release-assets/lambda/
136+
dest: release-assets/hive-cdn-aws-lambda.zip
115137

116138
- name: upload CDN release artifacts
117139
if:

packages/services/cdn-worker/README.md

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -66,26 +66,19 @@ curl --fail --location \
6666
unzip hive-cdn-cloudflare-worker.zip
6767
```
6868

69-
The extracted `index.mjs` is an ES module Worker. Create its required Workers KV namespace:
69+
The extracted `index.mjs` is an ES module Worker. Create a `wrangler.toml` next to it. The
70+
following is a minimal configuration; the six Analytics Engine bindings are required. Dataset
71+
names may be changed, but the binding names must remain unchanged.
7072

71-
```sh
72-
npx wrangler kv namespace create HIVE_DATA
73-
```
74-
75-
Copy the namespace ID printed by Wrangler into `wrangler.toml`. The following is a minimal
76-
configuration; the six Analytics Engine bindings are required. Dataset names may be changed, but the
77-
binding names must remain unchanged.
73+
The current Worker artifact does not read a Workers KV binding. Hive's Pulumi stack still creates a
74+
legacy `HIVE_DATA` namespace for historical reasons; you do not need it for a working deployment.
7875

7976
```toml
8077
name = "hive-cdn"
8178
main = "index.mjs"
8279
compatibility_date = "2026-03-03"
8380
workers_dev = true
8481

85-
[[kv_namespaces]]
86-
binding = "HIVE_DATA"
87-
id = "<KV_NAMESPACE_ID>"
88-
8982
[[analytics_engine_datasets]]
9083
binding = "USAGE_ANALYTICS"
9184
dataset = "hive_ha_cdn_usage_production"

0 commit comments

Comments
 (0)