-
Notifications
You must be signed in to change notification settings - Fork 2
56 lines (56 loc) · 1.57 KB
/
build-and-deploy-pages.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
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