fix: A3951 device image, dual battery text and card width #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |