-
Notifications
You must be signed in to change notification settings - Fork 9
38 lines (32 loc) · 1.33 KB
/
demo.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
name: Deploy demo
on:
push:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install wasm-pack
uses: jetli/wasm-pack-action@v0.3.0
- name: Build web app
run: |
wasm-pack build --release --target web route-snapper
wasm-pack build --release --target web osm-to-route-snapper
wasm-pack build --release --target web geojson-to-route-snapper
cp route-snapper/lib.js route-snapper/pkg
mkdir -p publish/route-snapper
mkdir -p publish/osm-to-route-snapper
mkdir -p publish/geojson-to-route-snapper
cp examples/*.html examples/southwark.bin publish
cp -Rv route-snapper/pkg publish/route-snapper
cp -Rv osm-to-route-snapper/pkg publish/osm-to-route-snapper/
cp -Rv geojson-to-route-snapper/pkg publish/geojson-to-route-snapper/
rm -f publish/route-snapper/pkg/.gitignore
rm -f publish/osm-to-route-snapper/pkg/.gitignore
rm -f publish/geojson-to-route-snapper/pkg/.gitignore
- name: Publish
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./publish/