diff --git a/.github/workflows/emsdk.yml b/.github/workflows/emsdk.yml index 0bf249b..40dd343 100644 --- a/.github/workflows/emsdk.yml +++ b/.github/workflows/emsdk.yml @@ -68,10 +68,14 @@ jobs: build_em/infinisim.js build_em/infinisim.wasm + # using https://github.com/gzuidhof/coi-serviceworker to get Cross-origin isolation on gh-pages + # otherwise the error 'Uncaught ReferenceError: SharedArrayBuffer is not defined' will be shown - name: Prepare Github Page shell: bash run: | mkdir emscripten + curl -o emscripten/coi-serviceworker.js https://raw.githubusercontent.com/gzuidhof/coi-serviceworker/ed2fbe98a222b8e0991a839f504137408d56d2e6/coi-serviceworker.js + sed -i -e 's###' build_em/infinisim.html mv build_em/infinisim.html \ build_em/infinisim.js \ build_em/infinisim.wasm \