-
Notifications
You must be signed in to change notification settings - Fork 32
60 lines (51 loc) · 1.6 KB
/
web-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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Publish Web Demo
on:
push:
tags:
- "v*"
jobs:
publish-web-demo:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Just ⚙️
run: curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | sudo bash -s -- --to /usr/local/bin
- name: Cargo Registry Cache
uses: actions/cache@v2
with:
path: |
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
key: cargo-registry
- name: Rust Toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: wasm32-unknown-unknown
override: true
- uses: jetli/wasm-bindgen-action@v0.1.0
with:
version: "0.2.83"
- name: Build WASM Release 🔨
run: just build-release-web
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@4.1.3
with:
branch: gh-pages
folder: web-target/wasm-release
target-folder: player/${{ github.ref_name }}
ssh-key: ${{ secrets.MASTER_GH_PAGES_DEPLOY_KEY }}
- name: Symlink Latest Build
run: |
mkdir latest-symlink-dir
ln -s ./${{ github.ref_name }} latest
mv latest latest-symlink-dir
- name: Deploy Symlinked Latest Build 🚀
uses: JamesIves/github-pages-deploy-action@4.1.3
with:
branch: gh-pages
folder: latest-symlink-dir
clean: false
target-folder: player
ssh-key: ${{ secrets.MASTER_GH_PAGES_DEPLOY_KEY }}