Astro builds to static files — you can deploy anywhere. Here are the three most popular options.

Before You Deploy

  1. Update site in astro.config.mjs to your domain:
export default defineConfig({
  site: 'https://yoursite.com',
  output: 'static',
});
  1. Run a production build to make sure everything works:
npm run build

If it succeeds without errors, you’re ready to deploy.

Cloudflare Pages is free, fast, and integrates with Git. All LiteInk demos run on Cloudflare.

Option A — Git Integration (Auto-Deploy)

  1. Push your project to a GitHub repository
  2. Go to dash.cloudflare.com → Workers & Pages → Create
  3. Connect your GitHub account and select the repo
  4. Set build settings:
    • Framework preset: Astro
    • Build command: npm run build
    • Build output directory: dist
  5. Click Save and Deploy

Every git push to main now triggers an automatic rebuild.

Option B — Wrangler CLI (Manual)

npm run build
npx wrangler pages deploy dist --project-name=my-site

Custom Domain

After deployment, go to your project’s Custom domains tab and add your domain. Cloudflare will handle SSL automatically.

Vercel

  1. Push to GitHub
  2. Go to vercel.com → New Project
  3. Import your repo — Vercel auto-detects Astro
  4. Click Deploy

Vercel handles builds, CDN, and SSL out of the box. Custom domains are in Project Settings → Domains.

Netlify

  1. Push to GitHub
  2. Go to app.netlify.com → Add new site → Import from Git
  3. Set build settings:
    • Build command: npm run build
    • Publish directory: dist
  4. Click Deploy site

GitHub Pages

GitHub Pages is free but requires a slightly different setup:

  1. Set site and base in astro.config.mjs:
export default defineConfig({
  site: 'https://username.github.io',
  base: '/repo-name',
  output: 'static',
});
  1. Build and deploy using GitHub Actions or the gh-pages package.

Note: GitHub Pages doesn’t support custom error pages or advanced routing rules.

Post-Deploy Checklist

  • Test on mobile and desktop
  • Check that the sitemap is accessible at /sitemap-index.xml
  • Verify robots.txt is served correctly
  • Submit your sitemap to Google Search Console
  • Check Core Web Vitals with PageSpeed Insights

What’s Next?

  • SEO Guide — Get found on Google
  • FAQ — Common questions