Skip to content

Commit 3c952bc

Browse files
committed
fix: ci fixes
1 parent 7fbaceb commit 3c952bc

File tree

3 files changed

+69
-16
lines changed

3 files changed

+69
-16
lines changed

scripts/deploy.mjs

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,17 @@ async function main(argv = process.argv) {
138138
for (const key of allKeys) {
139139
secrets[key] = process.env[key];
140140
}
141-
childProcess.execFileSync('wrangler', secretBulkArgs, {
142-
input: JSON.stringify(secrets),
143-
});
141+
try {
142+
childProcess.execFileSync('wrangler', secretBulkArgs, {
143+
input: JSON.stringify(secrets),
144+
stdio: ['pipe', 'inherit', 'inherit'],
145+
encoding: 'utf-8',
146+
});
147+
console.log("✅ Secrets uploaded. Proceeding to deploy...");
148+
} catch (err) {
149+
console.error("❌ Secret upload failed:", err.message);
150+
process.exit(1);
151+
}
144152
const deployArgs = ['deploy', '--config', './wrangler.toml', ...restArgs];
145153
console.error(['wrangler', ...deployArgs].join(' '));
146154
childProcess.execFileSync('wrangler', deployArgs, {

wrangler.toml

Lines changed: 35 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,43 @@ main = "src/worker.ts"
33
send_metrics = false
44
compatibility_flags = [ "nodejs_compat" ]
55
compatibility_date = "2024-09-23"
6-
routes = [
7-
{ pattern = "dev.testnet.polykey.com", custom_domain = true },
8-
{ pattern = "dev.mainnet.polykey.com", custom_domain = true },
9-
]
6+
7+
[[routes]]
8+
pattern = "dev.testnet.polykey.com"
9+
custom_domain = true
10+
11+
[[routes]]
12+
pattern = "dev.mainnet.polykey.com"
13+
custom_domain = true
14+
1015
[site]
11-
bucket = "./public"
16+
bucket = "./public"
1217

1318
[env.staging]
14-
name = "polykey-network-dashboard-staging"
15-
routes = [
16-
{ pattern = "testnet.polykey.com/*", custom_domain = true },
17-
]
19+
name = "polykey-network-dashboard-staging"
20+
21+
[[env.staging.routes]]
22+
pattern = "testnet.polykey.com/*"
23+
custom_domain = true
1824

1925
[env.master]
20-
name = "polykey-network-dashboard"
21-
routes = [
22-
{ pattern = "mainnet.polykey.com/*", custom_domain = true },
23-
]
26+
name = "polykey-network-dashboard"
27+
28+
[[env.master.routes]]
29+
pattern = "mainnet.polykey.com/*"
30+
custom_domain = true
31+
32+
[env.feature-rework]
33+
name = "polykey-network-dashboard-dev-feature-rework"
34+
migrations = [ ]
35+
36+
[[env.feature-rework.routes]]
37+
pattern = "feature-rework.dev.testnet.polykey.com"
38+
custom_domain = true
39+
40+
[[env.feature-rework.routes]]
41+
pattern = "feature-rework.dev.mainnet.polykey.com"
42+
custom_domain = true
43+
44+
[env.feature-rework.durable_objects]
45+
bindings = [ ]

wrangler.toml.bak

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name = "polykey-network-dashboard-dev"
2+
main = "src/worker.ts"
3+
send_metrics = false
4+
compatibility_flags = [ "nodejs_compat" ]
5+
compatibility_date = "2024-09-23"
6+
routes = [
7+
{ pattern = "dev.testnet.polykey.com", custom_domain = true },
8+
{ pattern = "dev.mainnet.polykey.com", custom_domain = true },
9+
]
10+
[site]
11+
bucket = "./public"
12+
13+
[env.staging]
14+
name = "polykey-network-dashboard-staging"
15+
routes = [
16+
{ pattern = "testnet.polykey.com/*", custom_domain = true },
17+
]
18+
19+
[env.master]
20+
name = "polykey-network-dashboard"
21+
routes = [
22+
{ pattern = "mainnet.polykey.com/*", custom_domain = true },
23+
]

0 commit comments

Comments
 (0)