v1.8.3 #25
Workflow file for this run
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 & Deploy Pages | |
'on': | |
push: | |
tags: | |
- '[0-9]+.[0-9]+.[0-9]+' | |
jobs: | |
build-wasm: | |
name: Build wasm | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: numworks/setup-emscripten@bbc4f5e15974bc13e69fdadecfd1858ecb1c4dbb # there is no v1 tag/branch | |
- name: Get emscripten version | |
id: em-version | |
shell: bash | |
run: | | |
{ | |
echo 'DETAILS<<EOF' | |
emcc -v 2>&1 | |
echo EOF | |
} >>$GITHUB_OUTPUT | |
- uses: actions/cache@v4 | |
with: | |
path: /opt/hostedtoolcache/emscripten/latest/x64/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/lto | |
key: libsv-${{ steps.em-version.outputs.DETAILS }} | |
# restore-keys intentionally omitted | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ^20.10 | |
- name: Run build script | |
shell: bash | |
run: | | |
cd wasm | |
npm ci --omit dev --no-fund | |
npm run build | |
mkdir ../Release | |
mv *.css index.js worker.js ldworker.js Colors.js *.wasm ../Release/ | |
cp *.html favicon.ico ../Release/ | |
- uses: actions/upload-pages-artifact@v3 | |
with: | |
path: Release/ | |
deploy-pages: | |
name: Deploy GitHub Pages | |
runs-on: ubuntu-latest | |
needs: build-wasm | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- id: deployment | |
uses: actions/deploy-pages@v4 | |
with: | |
error_count: 1 |