1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-18 17:19:50 +00:00

Attempt to fix Web builds in GitHub Pages using a workaround for SharedArrayBuffer

Thanks to e4c1d959e6/.github/workflows/Pipeline.yml (L107-L112)
This commit is contained in:
Emmanouil Papadeas 2023-09-04 16:42:39 +03:00
parent 91bfef16b3
commit adbf1dc63f
2 changed files with 15 additions and 3 deletions

View file

@ -32,6 +32,12 @@ jobs:
- name: Install rsync 📚 - name: Install rsync 📚
run: | run: |
apt-get update && apt-get install -y rsync apt-get update && apt-get install -y rsync
# Workaround for SharedArrayBuffer support on GitHub Pages
# See: https://github.com/godotengine/godot-docs/issues/7084
- run: |
cd ./build/web
curl -fsSL https://github.com/gzuidhof/coi-serviceworker/raw/master/coi-serviceworker.js > coi-serviceworker.js
sed -i 's#\( <script src="index.js"></script>\)# <script src="coi-serviceworker.js"></script>\n\1#g' index.html
- name: Deploy 🚀 - name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4 uses: JamesIves/github-pages-deploy-action@v4
with: with:

View file

@ -193,12 +193,18 @@ jobs:
- name: Install rsync 📚 - name: Install rsync 📚
run: | run: |
apt-get update && apt-get install -y rsync apt-get update && apt-get install -y rsync
- name: Upload Release Assets to itch.io 🎮
run: |
butler push ./build/web ${{ secrets.ITCHIO_USERNAME }}/${{ secrets.ITCHIO_GAME }}:web --userversion ${{env.TAG}}
# Workaround for SharedArrayBuffer support on GitHub Pages
# See: https://github.com/godotengine/godot-docs/issues/7084
- run: |
cd ./build/web
curl -fsSL https://github.com/gzuidhof/coi-serviceworker/raw/master/coi-serviceworker.js > coi-serviceworker.js
sed -i 's#\( <script src="index.js"></script>\)# <script src="coi-serviceworker.js"></script>\n\1#g' index.html
- name: Deploy 🚀 - name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4 uses: JamesIves/github-pages-deploy-action@v4
with: with:
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}
single-commit: true single-commit: true
folder: build/web # The folder the action should deploy. folder: build/web # The folder the action should deploy.
- name: Upload Release Assets to itch.io 🎮
run: |
butler push ./build/web ${{ secrets.ITCHIO_USERNAME }}/${{ secrets.ITCHIO_GAME }}:web --userversion ${{env.TAG}}