Skip to content

Commit 6489312

Browse files
committed
test
1 parent 1719f9d commit 6489312

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,16 @@ jobs:
2727
go get -u github.com/php-any/origami@main
2828
go mod tidy
2929
GOOS=js GOARCH=wasm go build -o ../public/wasm/origami.wasm .
30-
# Copy wasm_exec.js from GOROOT to public folder
31-
cp $(go env GOROOT)/misc/wasm/wasm_exec.js ../public/wasm_exec.js
30+
# Try to locate and copy wasm_exec.js more robustly
31+
GOROOT=$(go env GOROOT)
32+
if [ -f "$GOROOT/misc/wasm/wasm_exec.js" ]; then
33+
cp "$GOROOT/misc/wasm/wasm_exec.js" ../public/wasm_exec.js
34+
elif [ -f "$GOROOT/lib/wasm/wasm_exec.js" ]; then
35+
cp "$GOROOT/lib/wasm/wasm_exec.js" ../public/wasm_exec.js
36+
else
37+
echo "Warning: wasm_exec.js not found in GOROOT. Downloading from CDN as fallback."
38+
curl -L https://cdn.jsdelivr.net/gh/golang/go@master/misc/wasm/wasm_exec.js -o ../public/wasm_exec.js
39+
fi
3240
cd ..
3341
3442
- name: Setup Node

0 commit comments

Comments
 (0)