emsdk #5
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: "emsdk" | |
on: workflow_dispatch | |
env: | |
EM_VERSION: 3.1.64 | |
EM_CACHE_FOLDER: 'emsdk-cache' | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup cache | |
id: cache-system-libraries | |
uses: actions/cache@v4 | |
with: | |
path: ${{env.EM_CACHE_FOLDER}} | |
key: ${{env.EM_VERSION}}-${{ runner.os }} | |
- uses: mymindstorm/setup-emsdk@v14 | |
with: | |
version: ${{env.EM_VERSION}} | |
actions-cache-folder: ${{env.EM_CACHE_FOLDER}} | |
- name: Make release | |
run: make emscripten_release | |
- name: Create artifact directory | |
run: mkdir dist | |
- name: Copy files to artifact directory | |
run: | | |
# Replace this list with your actual filenames | |
cp lizardshi.html dist/ | |
cp lizardshi.data dist/ | |
cp lizardshi.js dist/ | |
cp lizardshi.wasm dist/ | |
- name: Upload GitHub Pages artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: dist # The directory containing your site files | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 | |
- name: Output deployment URL | |
run: echo "Deployed to ${{ steps.deployment.outputs.page_url }}" |