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 serveoutput. The dev server builds into its own.hwaro/serve/directory (leavingpublic/untouched) with its devbase_url(e.g.http://127.0.0.1:3000) baked into every link, and stamps that directory with a.hwaro-devmarker.hwaro deployrefuses any source directory carrying the marker; if you hit that error, runhwaro buildand deploy the freshly built output instead.
General Steps
- Build the site:
hwaro build - Upload
public/directory to your host (or usehwaro deploy) - 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.