fix(ci): add tailwindcss installation step to CI workflow #72
Workflow file for this run
This file contains hidden or 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: CI | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
permissions: | |
contents: write | |
checks: write | |
pull-requests: write | |
env: | |
CARGO_TERM_COLOR: always | |
SQLX_OFFLINE: true | |
PATH: $GITHUB_PATH | |
jobs: | |
build: | |
name: Build and Test | |
container: | |
image: rust:latest | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Add Cargo bin to PATH | |
run: echo "/usr/local/cargo/bin" >> $GITHUB_PATH | |
- name: Install jq | |
run: | | |
apt-get update && apt-get install -y jq | |
- name: Install Cargo Binstall | |
run: | | |
curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash | |
- name: Install Cargo Tools | |
run: | | |
rustup target add wasm32-unknown-unknown | |
cargo binstall trunk -y | |
cargo binstall wasm-bindgen-cli -y | |
cargo binstall sqlx-cli -y | |
- name: Install tailwindcss and extra | |
working-directory: ${{ github.workspace }} | |
run: | | |
./scripts/install-tailwindcss.sh | |
trunk tools show | |
- name: Cache dependencies | |
uses: Swatinem/rust-cache@v2 | |
- name: Create .env file | |
run: | | |
cp .env.template .env | |
- name: Build | |
run: cargo build | |
- name: Run tests | |
run: cargo test | |
- name: Build frontend | |
working-directory: frontend | |
run: | | |
trunk build --release | |
- name: Upload build artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: dist | |
path: frontend/dist/ | |
retention-days: 7 |