-
Notifications
You must be signed in to change notification settings - Fork 13
40 lines (38 loc) · 995 Bytes
/
cd.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
name: cd
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build-demo:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: Swatinem/rust-cache@v1
- uses: actions-rs/toolchain@v1
- uses: jetli/wasm-pack-action@v0.3.0
- run: wasm-pack build --target web --release
working-directory: ./examples/demo
- uses: actions/upload-artifact@v2
with:
name: demo
path: |
examples/demo/index.html
examples/demo/pkg/crystalorb_demo.js
examples/demo/pkg/crystalorb_demo_bg.wasm
deploy-gh-pages:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
needs: [build-demo]
steps:
- uses: actions/download-artifact@v2
with:
name: demo
path: demo
- uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./