-
Notifications
You must be signed in to change notification settings - Fork 10
65 lines (52 loc) · 1.63 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
name: 'Build & Push branch to netlify'
on:
push:
workflow_dispatch:
jobs:
build-push-netlify:
strategy:
fail-fast: true
matrix:
platform: [ ubuntu-latest ]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v3
- name: ⏬ Install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- name: ⚡ Set up cargo cache
uses: Swatinem/rust-cache@v2
- name: ⏬ Setup node version
uses: actions/setup-node@v2
with:
node-version: 20
- name: ⏬ Enable corepack and install
run: corepack enable && corepack install
- name: 🔄 Setup yarn in node
uses: actions/setup-node@v4
with:
cache: 'yarn'
- name: ⏬ Install Ubuntu dependencies
if: matrix.platform == 'ubuntu-20.04'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
- name: 📥 Install Node Dependencies
run: yarn --frozen-lockfile
- name: ⏬ Install wasm-pack
uses: jetli/wasm-pack-action@v0.4.0
with:
version: 'latest'
- name: 🔨 Build UI
run: yarn build
- name: ⏫ Deploy to Netlify
id: netlify_deploy
run: |
prod_flag=""
if [ "$BRANCH_NAME" = "master" ]; then prod_flag="--prod"; fi
netlify deploy \
--dir manager-ui/dist \
--site ${{ secrets.NETLIFY_SITE_ID }} \
--auth ${{ secrets.NETLIFY_API_TOKEN }} \
$prod_flag