This repository was archived by the owner on May 29, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
63 lines (52 loc) · 1.5 KB
/
netlify.yaml
File metadata and controls
63 lines (52 loc) · 1.5 KB
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
61
62
63
name: netlify
on:
push:
branches:
- master
env:
CARGO_INCREMENTAL: 0
CARGO_NET_RETRY: 10
RUSTUP_MAX_RETRIES: 10
jobs:
netlify:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2021-11-02
target: wasm32-unknown-unknown
profile: minimal
override: true
components: rustfmt, rust-src
- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '15'
- name: Build wasm
run: |
cd rust-pack
cargo run
cd ../ra-wasm
wasm-pack build --target web
- name: Install www
uses: borales/actions-yarn@v2.0.0
with:
cmd: --cwd www --ignore-engines install # will run `yarn install` command
- name: Build www
uses: borales/actions-yarn@v2.0.0
with:
cmd: --cwd www --ignore-engines build # will run `yarn build` command
- name: Setup Netlify headers
run: sudo cp ./www/_headers ./www/dist
- name: Deploy production to Netlify
uses: South-Paw/action-netlify-deploy@v1.2.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
netlify-auth-token: ${{ secrets.NETLIFY_AUTH_TOKEN }}
netlify-site-id: ${{ secrets.NETLIFY_SITE_ID }}
build-dir: './www/dist'