feat: adds frontend build steps to gh action
This commit is contained in:
parent
6e31804f19
commit
cd8cac8ea6
37
.github/workflows/prod.yml
vendored
37
.github/workflows/prod.yml
vendored
@ -9,20 +9,20 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Cache dependencies
|
- name: Cache dependencies
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
~/.cargo
|
node_modules
|
||||||
target/
|
~/.cache/trunk
|
||||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
~/.cargo
|
||||||
restore-keys: ${{ runner.os }}-cargo-wordl
|
target/
|
||||||
|
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
||||||
|
restore-keys: ${{ runner.os }}-cargo-wordl
|
||||||
|
|
||||||
- name: Install Rust
|
- name: Install Rust
|
||||||
uses: actions-rs/toolchain@v1
|
uses: actions-rs/toolchain@v1
|
||||||
@ -30,6 +30,25 @@ jobs:
|
|||||||
profile: minimal
|
profile: minimal
|
||||||
toolchain: stable
|
toolchain: stable
|
||||||
|
|
||||||
|
- name: Add Rust target wasm32-unknown-unknown
|
||||||
|
run: rustup target add wasm32-unknown-unknown
|
||||||
|
|
||||||
|
- name: Install Trunk
|
||||||
|
run: cargo install trunk
|
||||||
|
|
||||||
|
- name: Install Node.js
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 20
|
||||||
|
|
||||||
|
- name: Install Tailwind CSS
|
||||||
|
run: npm install -g tailwindcss
|
||||||
|
|
||||||
|
- name: Build Frontend
|
||||||
|
working-directory: ./frontend
|
||||||
|
run: |
|
||||||
|
trunk build --release
|
||||||
|
|
||||||
- name: Build and test code
|
- name: Build and test code
|
||||||
run: |
|
run: |
|
||||||
cargo build --verbose --release
|
cargo build --verbose --release
|
||||||
|
Loading…
x
Reference in New Issue
Block a user