Examples
EN

Deploy

Build and deploy your site to production

Deploy your Hwaro site to any static hosting provider.

Build for Production

hwaro build

This generates static files in public/. You can optionally minify output:

hwaro build --minify

This performs conservative optimization: HTML comments are removed, whitespace inside and between tags is collapsed, and JSON/XML whitespace is compacted. Whitespace-sensitive elements (<pre>, <code>, <script>, <style>, …) and content structure are preserved. See the CLI Reference for details.

Everything in static/ is copied into public/ and deployed, including hidden dot-paths such as .well-known/security.txt and .domains, identically for cold and --cache/incremental builds. Common OS/editor/VCS cruft (.DS_Store, .git/, …) is filtered out automatically; see Static Files to tune it.

Never deploy hwaro serve output. The dev server builds into its own .hwaro/serve/ directory (leaving public/ untouched) with its dev base_url (e.g. http://127.0.0.1:3000) baked into every link, and stamps that directory with a .hwaro-dev marker. hwaro deploy refuses any source directory carrying the marker; if you hit that error, run hwaro build and deploy the freshly built output instead.

General Steps

  1. Build the site: hwaro build
  2. Upload public/ directory to your host (or use hwaro deploy)
  3. Configure your domain

Built-in Deploy Command

Hwaro includes hwaro deploy for deploying to configured targets:

hwaro deploy              # Deploy to [deployment] target, else the first configured target
hwaro deploy s3           # Deploy to a specific target by name
hwaro deploy s3 backup    # Deploy to multiple targets
hwaro deploy --dry-run    # Preview changes

See Deploy Configuration for full target setup, matchers, and options.

Platform Guides

See the platform-specific guides below for step-by-step deployment instructions.

In this section