Skip to content

Commit 42c79f5

Browse files
committed
Fix playground CORS by deploying to gh-pages branch
Problem: GitHub Releases don't serve files with CORS headers, blocking browser fetch() requests. CORS proxies are unreliable for large files. Solution: Deploy playground to gh-pages branch with WASM files included. - Main branch stays clean (no 63MB WASM files) - Workflow downloads WASM from latest release - Pushes to separate gh-pages branch (orphan, separate history) - GitHub Pages serves with proper CORS headers - Same-origin = no CORS issues Changes: - Updated deploy workflow to download WASM and push to gh-pages - Simplified index.html to use local files (served via Pages) - Added clangd files to .gitignore - Added ?prod=1 URL param for local testing
1 parent f8fcd30 commit 42c79f5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

.github/workflows/deploy-playground.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ jobs:
6464
mv nullsafe-playground/* .
6565
rm -rf nullsafe-playground
6666
67+
# Disable Jekyll processing
68+
touch .nojekyll
69+
6770
# Add all files (including the downloaded WASM)
6871
git add -A
6972

0 commit comments

Comments
 (0)