Skip to content

~36 animating the player #26

~36 animating the player

~36 animating the player #26

Workflow file for this run

name: deploy to gh-pages
on:
workflow_dispatch:
push:
branches:
- main
jobs:
build:
strategy:
matrix:
GODOT_VERSION: ["4.2.2"]
runs-on: ubuntu-latest
container:
image: barichello/godot-ci:${{ matrix.GODOT_VERSION }}
steps:
- uses: actions/checkout@v4
- name: Setup Godot build environment
run: |
mkdir -v -p ~/.local/share/godot/export_templates
mv /root/.local/share/godot/export_templates/${GODOT_VERSION}.stable ~/.local/share/godot/export_templates/${GODOT_VERSION}.stable
env:
GODOT_VERSION: ${{ matrix.GODOT_VERSION }}
- name: build
run: |
mkdir -v -p build/web
godot -v --headless --export-release "Web" build/web/index.html
# https://docs.godotengine.org/en/stable/tutorials/export/exporting_for_web.html#serving-the-files
- name: setup coi-serviceworker for workaround
working-directory: build/web
run: |
wget -O coi-serviceworker.min.js https://github.com/gzuidhof/coi-serviceworker/raw/master/coi-serviceworker.min.js
sed -i 's#\( <script src="index.js"></script>\)# <script src="coi-serviceworker.min.js"></script>\n\1#g' index.html
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: build/web
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployments.outputs.page_url }}
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4