Deployment

Build for production and set up CI/CD pipelines.

Production Build

star build

Build optimized, minified CSS for production. The CLI downloads a standalone Tailwind binary automatically — no Node.js or npm required.

# Build minified CSS (default)
star build

# Custom output path, unminified
star build --output static/css/app.css --no-minify

The Tailwind binary is resolved in order: system PATH → ~/.starui/cache/ → auto-download. Once cached, builds run entirely offline.

CI/CD Pipeline

Minimum Required Steps

A CI pipeline needs just two commands after installing dependencies:

# 1. Install dependencies
uv sync

# 2. Build production CSS
uv run star build

# 3. (Optional) Lint Tailwind class ordering
uv run star sort --check

star sort --check exits with code 1 if any files have unsorted Tailwind classes, without modifying them. Use it as a CI gate alongside your other linters.

Caching the Tailwind Binary

Why Cache?

The standalone Tailwind binary is ~40 MB. Without caching, every CI run downloads it fresh. Cache the ~/.starui/cache directory to skip this.

GitHub Actions

- uses: actions/cache@v4
  with:
    path: ~/.starui/cache
    key: starui-tailwind-${{ runner.os }}-${{ runner.arch }}

Other CI Systems

Cache the directory ~/.starui/cache using your provider's cache mechanism. The key should include OS and architecture since the binary is platform-specific.

Example GitHub Actions Workflow

A complete workflow that installs dependencies, caches the Tailwind binary, builds CSS, and lints class ordering:

name: Build & Lint

on:
  push:
    branches: [main]
  pull_request:

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - uses: astral-sh/setup-uv@v5
        with:
          enable-cache: true

      - run: uv sync

      - uses: actions/cache@v4
        with:
          path: ~/.starui/cache
          key: starui-tailwind-${{ runner.os }}-${{ runner.arch }}

      - run: uv run star build

      - run: uv run star sort --check