-
-
Notifications
You must be signed in to change notification settings - Fork 1
41 lines (34 loc) · 1.03 KB
/
deployment.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
name: Deploy
on:
push:
branches:
- main
- master
paths:
- "src/**"
- "Cargo.*"
workflow_dispatch:
jobs:
release:
name: deploy
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v2
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
default: true
override: true
- name: Install wasm toolchain
run: rustup target add wasm32-unknown-unknown
- uses: Swatinem/rust-cache@v1
- name: Build wasm binary 🔧
run: cargo build --release --target wasm32-unknown-unknown && mkdir -p build && mv target/wasm32-unknown-unknown/release/rusty-city.wasm build/
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@4.1.3
with:
branch: gh-pages # The branch the action should deploy to.
folder: build # The folder the action should deploy.
clean: false # do not remove index file