Skip to content

Print Graphics API info on the screen #12

Print Graphics API info on the screen

Print Graphics API info on the screen #12

name: Build and Deploy
on:
push:
branches: [ "trunk" ]
# pull_request:
# branches: [ "trunk" ]
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build emscripten using docker image
run: |
docker run --rm -v "$(pwd):/src" emscripten/emsdk emcmake cmake -S . -Bbuild-web -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXE_LINKER_FLAGS="-sUSE_GLFW=3 -sUSE_WEBGL2=1 -sFULL_ES3=1 -fexceptions --preload-file ./res/fonts/Cozette --preload-file ./shaders"
sudo mkdir -p build-web/res/fonts
sudo mkdir -p build-web/shaders
sudo cp -r res/fonts build-web/res
sudo cp ./shaders/*.webgl.* build-web/shaders
sudo cp index.html ./build-web
docker run --rm -v "$(pwd):/src" emscripten/emsdk cmake --build build-web -j
sudo mkdir -p dist
sudo cp build-web/index.html dist
sudo cp build-web/hellotext.* dist
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: dist # The folder the action should deploy.
CLEAN: true # Automatically remove deleted files from the deploy branch