Mira Astro documentation

Deploying

Put your clinic's site online for free with Cloudflare, Netlify, Vercel or any web host.

npm run build turns the project into a folder of plain files, dist/, that any web host can serve, and builds the search index inside it. The easiest way to publish is to put your project on GitHub and connect it to a free host, which rebuilds the site every time you save a change to GitHub.

Set site in astro.config.mjs to your final address first.

Settings for every host

Setting Value
Build command npm run build
Output folder dist
Node.js version 22.12 or newer

Cloudflare

Cloudflare is free, fast worldwide, and has no bandwidth limits.

  1. Put the project in a GitHub repository. GitHub Desktop makes this point-and-click.
  2. In the Cloudflare dashboard, go to Workers & Pages → Create and import the repository.
  3. Cloudflare now creates new projects as Workers. Mira includes a wrangler.jsonc file that tells it to serve the dist folder as a static site, so keep the suggested deploy command (npx wrangler deploy) and set the build command to npm run build.
  4. Click Deploy. When it finishes, add your domain under Settings → Domains & Routes.

Change "name" in wrangler.jsonc to your project’s name if you like. If you choose a classic Cloudflare Pages project instead, use the settings in the table above; wrangler.jsonc is then ignored.

Netlify

  1. Put the project in a GitHub repository.
  2. In Netlify, choose Add new site → Import an existing project and pick the repository.
  3. Netlify detects Astro and fills in the settings. Click Deploy.

To use Netlify Forms, see Forms.

Vercel

  1. Put the project in a GitHub repository.
  2. In Vercel, choose Add New → Project and import it.
  3. Vercel detects Astro. Click Deploy.

Any other web host

Run npm run build and upload the contents of dist to your host’s public folder (often public_html) with FTP or the host’s file manager. Upload the pagefind folder too, or search won’t work.

Nothing to rebuild for opening hours

“Open now” and today’s row in the hours table are worked out in the visitor’s browser, so they stay right without rebuilding. Rebuild only when you change your content.

Check before publishing

npm run check
npm run build
node scripts/check-links.mjs
npm run preview

npm run check finds mistakes in your content and code, check-links.mjs lists any links to pages that don’t exist, and npm run preview serves the built site at localhost:4321 so you can try search, the booking calendar and the maps before going live.