Deployment Options
About 282 wordsLess than 1 minute
2025-10-10
Deploy to Cloudflare Pages
In Cloudflare, go to
Workers and Pages→Create application→ choosePages→Import an existing Git repository.Cloudflare will detect Astro automatically. Confirm or set:
- Build command:
astro buildornpm run build - Output directory:
dist
- Build command:
Define the necessary
.envenvironment variables if you rely on the admin panel or analytics.Start the deployment.
Cloudflare Pages will build and deploy each time you push a change to the production branch.
Deploy to Netlify
Open the Netlify dashboard and click
Add a new site→Import an existing project.Netlify auto-detects Astro. Confirm or set:
- Build command:
astro buildornpm run build - Output directory:
dist
- Build command:
Add any
.envvalues required for the admin panel or analytics features.Start the deployment.
Future commits to your production branch will automatically trigger builds and deployments.
Deploy to Vercel
Import the project from Vercel.
Vercel will detect Astro automatically. Confirm or set the following values:
- Build command:
astro buildornpm run build - Output directory:
dist
- Build command:
If you use the admin panel or analytics, add the required
.envvariables to the project settings.Trigger the deployment.
Once configured, any change pushed to your production branch will trigger a new preview and deployment.
