fix(cloudflare): use custom domain and remote R2 uploads
This commit is contained in:
@@ -45,7 +45,7 @@ try {
|
|||||||
|
|
||||||
execFileSync(
|
execFileSync(
|
||||||
"npx",
|
"npx",
|
||||||
["wrangler", "r2", "object", "put", r2Bucket, objectKey, "--file", zipPath],
|
["wrangler", "r2", "object", "put", "--remote", `${r2Bucket}/${objectKey}`, "--file", zipPath],
|
||||||
{ cwd: root, stdio: "inherit" },
|
{ cwd: root, stdio: "inherit" },
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -65,7 +65,15 @@ try {
|
|||||||
)
|
)
|
||||||
|
|
||||||
console.log("[release-ui] Deploying worker")
|
console.log("[release-ui] Deploying worker")
|
||||||
execFileSync("npx", ["wrangler", "deploy"], { cwd: root, stdio: "inherit" })
|
execFileSync("npx", ["wrangler", "deploy"], {
|
||||||
|
cwd: root,
|
||||||
|
stdio: "inherit",
|
||||||
|
env: {
|
||||||
|
...process.env,
|
||||||
|
CLOUDFLARE_API_TOKEN: process.env.CLOUDFLARE_API_TOKEN,
|
||||||
|
CLOUDFLARE_ACCOUNT_ID: process.env.CLOUDFLARE_ACCOUNT_ID,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
console.log("[release-ui] Done")
|
console.log("[release-ui] Done")
|
||||||
} finally {
|
} finally {
|
||||||
|
|||||||
@@ -2,6 +2,12 @@ name = "codenomad-ui-host"
|
|||||||
main = "src/index.ts"
|
main = "src/index.ts"
|
||||||
compatibility_date = "2026-01-22"
|
compatibility_date = "2026-01-22"
|
||||||
|
|
||||||
|
# Custom domain for the manifest host.
|
||||||
|
# Note: Custom domains apply to all paths on the hostname.
|
||||||
|
[[routes]]
|
||||||
|
pattern = "ui.codenomad.neuralnomads.ai"
|
||||||
|
custom_domain = true
|
||||||
|
|
||||||
[assets]
|
[assets]
|
||||||
directory = "./dist"
|
directory = "./dist"
|
||||||
binding = "ASSETS"
|
binding = "ASSETS"
|
||||||
|
|||||||
Reference in New Issue
Block a user