Skip to content

Commit 04f5210

Browse files
ajitpratap0Ajit Pratap Singhclaude
authored
fix(wasm): commit gosqlx.wasm to git to fix production playground 404 (#423)
Root cause: Vercel's GitHub auto-deploy fires on merge to main but cannot build the WASM binary (it's a Go build step not in Vercel's build). The auto-deploy overwrites the website.yml CI deployment (which has WASM), resulting in /wasm/gosqlx.wasm returning HTTP 404 in production. Fix: - Remove gosqlx.wasm from .gitignore so it ships with every deploy - Add CI step to auto-commit rebuilt WASM when wasm/ source changes - Bump website.yml permissions: read → write (needed for the git push) The committed WASM (6.5MB, built 2026-03-16 from v1.13.0 source) is current — no changes to wasm/ source since that build date. Co-authored-by: Ajit Pratap Singh <ajitpratapsingh@Ajits-Mac-mini-2655.local> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 9dbab8e commit 04f5210

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

.github/workflows/website.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
workflow_dispatch:
1111

1212
permissions:
13-
contents: read
13+
contents: write
1414

1515
concurrency:
1616
group: vercel-production
@@ -39,6 +39,18 @@ jobs:
3939
cp playground/gosqlx.wasm ../website/public/wasm/
4040
cp playground/wasm_exec.js ../website/public/wasm/
4141
42+
- name: Commit rebuilt WASM if changed
43+
run: |
44+
git config user.name "github-actions[bot]"
45+
git config user.email "github-actions[bot]@users.noreply.github.com"
46+
git add website/public/wasm/gosqlx.wasm website/public/wasm/wasm_exec.js
47+
if git diff --cached --quiet; then
48+
echo "WASM unchanged, skipping commit"
49+
else
50+
git commit -m "chore(wasm): rebuild gosqlx.wasm from updated wasm/ source [skip ci]"
51+
git push origin main
52+
fi
53+
4254
- name: Setup Node
4355
uses: actions/setup-node@v4
4456
with:

website/.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,5 @@ yarn-error.log*
4040
*.tsbuildinfo
4141
next-env.d.ts
4242

43-
# WASM binary (built in CI)
44-
public/wasm/gosqlx.wasm
43+
# WASM binary — committed to git so Vercel auto-deploy includes it.
44+
# website.yml CI rebuilds and recommits when wasm/ source changes.

website/public/wasm/gosqlx.wasm

6.24 MB
Binary file not shown.

0 commit comments

Comments
 (0)