Deploying an Astro Site

Thumbnails of websites from the Astro Showcase site.

Deploying Your Astro Site

After building your Astro site, the next step is to share it with the world. Netlify offers a great platform for deploying Astro sites quickly and easily.

Steps to Deploy

  1. Push your code to GitHub: Make sure your Astro project is in a GitHub repository.

  2. Sign up for Netlify: If you haven’t already, create a Netlify account.

  3. Connect your repository: In Netlify, choose “New site from Git” and select your GitHub repository.

  4. Configure your build settings:

    • Build command: npm run build
    • Publish directory: dist
  5. Deploy: Click “Deploy site” and wait for Netlify to build and deploy your site.

Benefits of Netlify

  • Continuous Deployment: Any push to your main branch will trigger a new deploy.
  • SSL Certificate: Netlify provides free SSL certificates for your site.
  • Custom Domains: Easily set up custom domains for your Astro site.

Deploying to Netlify ensures your Astro site is fast, secure, and always up-to-date!