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: Build Silvergun Engine Demo (emcc) | |
on: [push] | |
# https://github.com/marketplace/actions/checkout | |
# https://github.com/marketplace/actions/setup-emscripten-toolchain | |
# https://github.com/marketplace/actions/push-git-subdirectory-as-branch | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: mymindstorm/setup-emsdk@v14 | |
- name: Build demo | |
run: bash build_emscripten.sh | |
- name: Clean build artifacts | |
run: | | |
cd build_emscripten | |
rm -rf _deps | |
rm -rf assets | |
rm -rf CMakeFiles | |
rm -rf demos | |
find . ! -name 'slvdemo.*' -delete | |
rm slvdemo.html | |
- name: Copy HTML files | |
run: | | |
cp -r html/index.html build_emscripten/index.html | |
cp -r html/index.css build_emscripten/index.css | |
- uses: s0/git-publish-subdir-action@develop | |
env: | |
REPO: self | |
BRANCH: gh-pages | |
FOLDER: build_emscripten | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |