-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (35 loc) · 1.05 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
46
name: Deploy site
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# First step; build the wasm
- name: Install wasm-pack
uses: jetli/[email protected]
with:
version: 'v0.10.0'
- name: Build the game-of-life package
working-directory: src/pkg/game-of-life/rust
run: wasm-pack build --release --out-name index --target bundler .
# Next, compile the pkg json file to update the package info
- name: Install Ruby
uses: ruby/setup-ruby@473e4d8fe5dd94ee328fdfca9f8c9c7afc9dae5e
with:
ruby-version: 3.0.0
- name: Build pkg.json
run: ruby pkg.rb
# Lastly, build the production js and deploy it to the other github repo
- name: Install node
uses: actions/setup-node@v2
with:
node-version: 16
- run: npm ci
- name: Build and deploy the site
run: bash deploy.sh
env:
GH_TOKEN: "${{ secrets.GH_TOKEN }}"