Maia docs
Deploying
Put your site online for free with Cloudflare Pages, Netlify, Vercel or GitHub Pages.
npm run build turns the project into a folder of plain files, dist/, that any web host can serve. 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 or newer (the project includes a .node-version file) |
Cloudflare Pages
- Put the project in a GitHub repository. GitHub Desktop makes this point-and-click.
- In the Cloudflare dashboard, go to Workers & Pages → Create → Pages → Connect to Git and pick the repository.
- Choose the Astro preset, or enter the settings above, and click Save and Deploy.
- When the first build finishes, add your domain under Custom domains.
Netlify
- Put the project in a GitHub repository.
- In Netlify, choose Add new site → Import an existing project and pick the repository.
- Netlify detects Astro and fills in the settings. Click Deploy.
Vercel
- Put the project in a GitHub repository.
- In Vercel, choose Add New → Project and import it.
- Vercel detects Astro. Click Deploy.
GitHub Pages
Follow Astro’s GitHub Pages guide, which uses a ready-made workflow file. If your site will live at https://username.github.io/repository/ instead of your own domain, also set base: '/repository' in astro.config.mjs.
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.
Check before publishing
npm run build
npm run preview
This serves the finished site at localhost:4321, exactly as it will appear online.