Small fix #98
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Pages | |
on: push | |
env: | |
BUILD_TYPE: Release | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Configure dependencies | |
run: | | |
sudo apt -y install build-essential cmake libsdl2-dev libsdl2-image-dev libsdl2-ttf-dev curl zip | |
git submodule update --init --recursive | |
- name: Configure emscripten | |
run: | | |
git clone https://github.com/emscripten-core/emsdk.git | |
cd emsdk | |
./emsdk install latest | |
./emsdk activate latest | |
source emsdk_env.sh | |
- name: Configure Emscripten Cache | |
uses: actions/cache@v4 | |
with: | |
path: emsdk/upstream/emscripten/cache | |
key: emscripten-${{ runner.os }} | |
- name: Run CMake | |
run: | | |
source emsdk/emsdk_env.sh | |
mkdir build | |
emcmake cmake -S . -B build -Wno-dev -DDEBUG=0 -DWASM=1 | |
- name: Build | |
run: | | |
source emsdk/emsdk_env.sh | |
cd build | |
emmake make -j $(nproc) | |
- name: Upload | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: build/wasm/ | |
deploy: | |
if: startsWith(github.ref, 'refs/tags/') | |
needs: build | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 | |