aboutsummaryrefslogtreecommitdiff
path: root/deploy
blob: b3c6d6135245d42db1c14874374501c9a303c880 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/env bash
set -e
git branch -D pages
git checkout -b pages
rm -f public/game_of_life.js
rm -f public/game_of_life_bg.wasm
rm -f public/game_of_life_bg.wasm.gz
wasm-pack build --release --target web
mv pkg/game_of_life.js public
wasm-opt -O -o public/game_of_life_bg.wasm pkg/game_of_life_bg.wasm
gzip -9 --keep public/game_of_life_bg.wasm
git add .
git commit -m "Deploy pages"
git push --force origin pages
git checkout master
git branch -D pages