CI: Use coi-serviceworker for Cross-origin isolation on gh-pages
https://github.com/gzuidhof/coi-serviceworker
This commit is contained in:
parent
0febb00f2b
commit
99a5c95c93
|
@ -68,10 +68,14 @@ jobs:
|
||||||
build_em/infinisim.js
|
build_em/infinisim.js
|
||||||
build_em/infinisim.wasm
|
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
|
- name: Prepare Github Page
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
mkdir emscripten
|
mkdir emscripten
|
||||||
|
curl -o emscripten/coi-serviceworker.js https://raw.githubusercontent.com/gzuidhof/coi-serviceworker/ed2fbe98a222b8e0991a839f504137408d56d2e6/coi-serviceworker.js
|
||||||
|
sed -i -e 's#</body>#<script src="coi-serviceworker.js"></script></body>#' build_em/infinisim.html
|
||||||
mv build_em/infinisim.html \
|
mv build_em/infinisim.html \
|
||||||
build_em/infinisim.js \
|
build_em/infinisim.js \
|
||||||
build_em/infinisim.wasm \
|
build_em/infinisim.wasm \
|
||||||
|
|
Loading…
Reference in New Issue