-
Notifications
You must be signed in to change notification settings - Fork 6
57 lines (48 loc) · 1.19 KB
/
build.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
57
name: Build
on: push
env:
EM_VERSION: 3.1.61
EM_CACHE_FOLDER: 'emsdk-cache'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup cache
id: cache-system-libraries
uses: actions/cache@v4
with:
path: ${{env.EM_CACHE_FOLDER}}
key: ${{env.EM_VERSION}}-${{ runner.os }}
- name: Setup Emscripten toolchain
uses: mymindstorm/setup-emsdk@v14
with:
version: ${{env.EM_VERSION}}
actions-cache-folder: ${{env.EM_CACHE_FOLDER}}
- name: Build Wasm
run: ./build-wasm.sh
- name: Build Shell
run: |
npm install
npm run type
npm run build
- name: Upload artifacts for GitHub Pages
uses: actions/upload-pages-artifact@v3
with:
path: dist
deploy:
needs: build
if: ${{ github.ref == 'refs/heads/master' }}
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
permissions:
pages: write
id-token: write
steps:
- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v4
id: deployment