File tree Expand file tree Collapse file tree 2 files changed +55
-0
lines changed Expand file tree Collapse file tree 2 files changed +55
-0
lines changed Original file line number Diff line number Diff line change 1+ name : CI
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+
8+ env :
9+ NODE_VERSION : 14.0.0
10+
11+ jobs :
12+ publish-react-app :
13+ name : Publish react example
14+ runs-on : ubuntu-latest
15+ steps :
16+ - name : Fetch code
17+ uses : actions/checkout@v2
18+ with :
19+ fetch-depth : 1
20+
21+ - name : Install Rust nightly with wasm32-unknown-unknown
22+ run : rustup toolchain install nightly --target wasm32-unknown-unknown
23+
24+ - name : Install Node.js dependencies
25+ run : |
26+ npm ci
27+ cd examples/react-app && npm ci
28+
29+ - uses : actions/cache@v2
30+ id : binaryen-cache
31+ with :
32+ path : binaryen-version_100
33+ key : binaryen-version_100
34+
35+ - name : Install wasm-opt (binaryen)
36+ if : steps.binaryen-cache.outputs.cache-hit != 'true'
37+ run : |
38+ wget https://github.com/WebAssembly/binaryen/releases/download/version_100/binaryen-version_100-x86_64-linux.tar.gz
39+ tar zxvf binaryen-version_100-x86_64-linux.tar.gz binaryen-version_100/bin/wasm-opt
40+
41+ - name : Build wasm
42+ run : export PATH=$PATH:./binaryen-version_100/bin/ && make build-wasm
43+
44+ - name : Build JS
45+ run : make build-js
46+
47+ - name : Build react-app
48+ run : cd examples/react-app && npm run build
49+
50+ - name : Deploy 🚀
51+ uses : JamesIves/github-pages-deploy-action@4.1.1
52+ with :
53+ branch : gh-pages
54+ folder : examples/react-app/dist
Original file line number Diff line number Diff line change 4444coverage \
4545examples/random-in-node/node_modules \
4646examples/react-app/dist/* .js \
47+ examples/react-app/dist/* .txt \
4748examples/react-app/dist/* .wasm \
4849examples/react-app/node_modules \
4950lib \
You can’t perform that action at this time.
0 commit comments