Skip to content

Commit 082bc47

Browse files
committed
Fix: remove comments from wrangler.jsonc for JSON parsing
1 parent 3b2d800 commit 082bc47

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

.github/workflows/deploy-cloudflare.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,7 @@ jobs:
2525
run: |
2626
node -e "
2727
const fs = require('fs');
28-
let content = fs.readFileSync('wrangler.jsonc', 'utf8');
29-
// Remove comments for JSON parsing
30-
const config = JSON.parse(content.replace(/\/\/.*$/gm, '').replace(/,(\s*[}\]])/g, '\$1'));
28+
const config = JSON.parse(fs.readFileSync('wrangler.jsonc', 'utf8'));
3129
config.vars = {
3230
...config.vars,
3331
AUTH_SECRET: process.env.AUTH_SECRET,

wrangler.jsonc

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,4 @@
1414
"CLIENT_ID": "web",
1515
"DEFAULT_ORG": "unfoldingWord"
1616
}
17-
// Secrets injected at deploy time via GitHub Actions:
18-
// - AUTH_SECRET
19-
// - ENGINE_API_KEY
20-
// - GOOGLE_CLIENT_ID
21-
// - GOOGLE_CLIENT_SECRET
2217
}

0 commit comments

Comments
 (0)