Attempt with pages #1
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 and Deploy to GitHub Pages | |
on: | |
push: | |
branches: | |
- WebGL | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Emscripten | |
uses: docker://emscripten/emsdk:3.1.5 | |
- name: Build with emcmake | |
run: | | |
mkdir build | |
cd build | |
emcmake cmake -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=$GITHUB_WORKSPACE/build_output .. | |
emmake make | |
- name: Upload artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: build_output | |
path: build_output | |
deploy: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Download build artifact | |
uses: actions/download-artifact@v2 | |
with: | |
name: build_output | |
path: build_output | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./build_output |