Run on Hosting
Deploy and Publish Your Website
Once your project is on GitHub, the next step is to make it live on the internet. The Blacks template builds to static HTML — which means it can be hosted for free on any modern static hosting provider.
This guide walks you through deploying to Cloudflare Pages, Netlify, and Vercel. All three are free for static sites, and all three support automatic deploys from GitHub.
Before You Deploy
Make sure you have:
- A GitHub account with your Blacks project pushed
- Your
siteURL updated inastro.config.mjs - The correct build settings:
- Build command:
npm run build - Output directory:
dist
- Build command:
See the GitHub Repo guide if you haven’t pushed your project yet.
Recommended: Cloudflare Pages
Cloudflare Pages is the recommended host for Blacks — free, fast, and offers unlimited bandwidth.
Steps:
- Go to pages.cloudflare.com and sign up with your GitHub account
- Click Create application → Pages → Connect to Git
- Select your Blacks repository from the list
- Set the build settings:
- Build command:
npm run build - Build output directory:
dist
- Build command:
- Click Save and Deploy
Your site goes live in about 2 minutes at https://your-project.pages.dev.
Every future push to master (or main) triggers an automatic deploy.
Alternative: Netlify
Netlify is another solid choice — drag-and-drop deploy or Git integration.
Steps:
- Go to netlify.com and sign up with your GitHub account
- Click Add new site → Import an existing project
- Select GitHub and authorize Netlify
- Choose your Blacks repository
- Set the build settings:
- Build command:
npm run build - Publish directory:
dist
- Build command:
- Click Deploy site
Your site goes live at https://your-project.netlify.app.
Alternative: Vercel
Vercel is designed for frontend frameworks and detects Astro automatically.
Steps:
- Go to vercel.com and sign up with your GitHub account
- Click Add New → Project
- Select your Blacks repository
- Vercel auto-detects Astro and fills in the settings:
- Build command:
npm run build - Output directory:
dist
- Build command:
- Click Deploy
Your site goes live at https://your-project.vercel.app.
How Automatic Deploys Work
Once connected to GitHub, every push triggers a new build and deploy automatically.
| Action | Result |
|---|---|
Push to master (or main) | Production deploy |
| Push to another branch | Preview deploy with a unique URL |
| Open a pull request | Preview deploy with a PR comment |
You never manually deploy again. Just commit and push.
Build Settings Summary
All three hosts use the same build settings:
| Setting | Value |
|---|---|
| Build command | npm run build |
| Output directory | dist |
| Node version | 20 or newer |
Troubleshooting
| Problem | Solution |
|---|---|
| Build fails | Check that Node.js 20+ is set in the host’s environment settings |
| 404 errors on the live site | Verify the output directory is set to dist |
| Images not loading | Check that the site URL in astro.config.mjs matches your domain |
| Slow first load | Enable CDN caching in the host’s settings |
| Custom domain not working | Add the domain in the host’s dashboard and update your DNS records |
Adding a Custom Domain
All three hosts let you add a custom domain for free.
General steps:
- Go to your project’s settings in the host dashboard
- Find the Domains or Custom domain section
- Add your domain (for example:
yourdomain.com) - Update your DNS records at your domain registrar:
- A record → the host’s IP address
- CNAME record → the host’s subdomain
- Wait for DNS propagation (usually 5–30 minutes)
HTTPS is enabled automatically on all three hosts.
Need Help?
If you run into any issues during deployment, our team is available to help.
Contact: axcora@gmail.com
Next Step
Your website is live. Continue to:
👉 Headless CMS — optional integration with a Git-based CMS