Deploying an Astro 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
-
Push your code to GitHub: Make sure your Astro project is in a GitHub repository.
-
Sign up for Netlify: If you haven’t already, create a Netlify account.
-
Connect your repository: In Netlify, choose “New site from Git” and select your GitHub repository.
-
Configure your build settings:
- Build command:
npm run build
- Publish directory:
dist
- Build command:
-
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!