-
Notifications
You must be signed in to change notification settings - Fork 5
43 lines (35 loc) · 1.07 KB
/
website.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
name: Build WASM and publish website
on:
push:
branches: [ main ]
# push:
# tags:
# - v[0-9]+.*
jobs:
build-wasm-and-publish:
concurrency: ci-${{ github.ref }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install rust-toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Install wasm-pack
run: |
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
wasm-pack --version
- name: Run JS tests
working-directory: ./entab-js
run: wasm-pack test --headless --chrome
- name: Build the WASM
working-directory: ./entab-js
run: wasm-pack build --target web --out-dir ./example/pkg
- name: Delete .gitignore so pkg will be pushed too
run: rm .gitignore entab-js/example/pkg/.gitignore
- name: Publish to Github pages
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: entab-js/example
single-commit: true