-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (64 loc) · 1.98 KB
/
netlify.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
61
62
63
64
65
66
name: netlify
on:
push:
branches: [before-webpack]
pull_request:
branches: [main]
jobs:
build:
name: Build and test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
id: cargo-cache
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
nat-example/target/
key: ${{ runner.os }}-cargo1-${{ hashFiles('**/Cargo.lock') }}
- uses: actions/cache@v2
id: cargo-bin-cache
with:
path: |
~/.cargo/bin/
/usr/local/bin/wash
key: ${{ runner.os }}-cargo1 }}
# - name: a
# run: &&
- name: cargo/bin
run: ls ~/.cargo/bin/
- name: Install neccessary tool
env:
CACHE_HIT: ${{steps.cargo-bin-cache.outputs.cache-hit}}
run: |
wasm-bindgen --version || { cargo install -f wasm-bindgen-cli --vers 0.2.78;}
cargo make --version || { cargo install -f cargo-make;}
- name: install-wasm32
run: rustup target add wasm32-unknown-unknown
- name: build_ui
uses: marcopolo/cargo@master
with:
command: make
args: wasm-bindgen
working-directory: ./nat-example
- name: webpack build
run: |
cd nat-example && npm i && npm run build
- name: Deploy to Netlify
uses: nwtgck/[email protected]
with:
publish-dir: './nat-example/public'
production-branch: before-webpack
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message: "Deploy from GitHub Actions"
enable-pull-request-comment: false
enable-commit-comment: true
overwrites-pull-request-comment: true
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.QQPARTY_NETLIFY_SITE_ID }}
timeout-minutes: 2