-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (36 loc) · 1.13 KB
/
deploy.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
name: Build and Deploy to Github Pages
on:
push:
branches:
- main
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
with:
persist-credentials: false
- name: Install Zig 🔧
uses: korandoru/setup-zig@v1
with:
zig-version: master
- name: Install Emscripten 🔧
run: |
curl -O https://codeload.github.com/emscripten-core/emsdk/tar.gz/refs/tags/3.1.51
tar xzf 3.1.51
cd emsdk-3.1.51
./emsdk install latest
./emsdk activate latest
- name: Run tests 📊
run: zig build test
- name: Build 🏗️
run: zig build --sysroot emsdk-3.1.51/upstream/emscripten -Dtarget=wasm32-emscripten -Doptimize=ReleaseFast && sed -i'' -e 's/_emscripten_return_address,/() => {},/g' www/ray-tracer-challenge.js
- name: Deploy to GH Pages 🚀
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: www