Currently I follow **Build a blog" tutorial from Astro docs. It's setup to auto deploy to Netlify when commit to GitHub. The problem is that I am on free plan with 300 credit. It's 15 credit per deploy, meaning I only have 20 deploy for free. For early development it's not enough. While I can just keep dev on local, I need commit to GitHub for backup. How to avoid that? Is there's a way for deploy locally, then manually upload to Netlify while still connected to GitHub and Netlify.
#Avoid auto deploy to Netlify when commit to GitHub
7 messages · Page 1 of 1 (latest)
Hi @split fern. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
Astro’s docs only describe the normal Netlify flow where every push to your Git repo triggers a deploy; they don’t document how to turn that off or switch to a fully manual deploy while the site stays connected to GitHub.[Quick deploy][Netlify guide]
From the available information, what is clear is:
-
Netlify’s standard Git-based setup is:
- You connect your GitHub repo.
- Netlify “automatically detect[s] pushes to your Astro project’s source repository, build[s] your site and deploy[s] it to the web” using
astro buildanddist.[Quick deploy]
-
The alternative is to use the Netlify CLI to deploy, which does not require this automatic Git-based flow; you install
netlify-cli, runnetlify init, and then Netlify “will automatically detect the build settings (astro build) and deploy directory (dist)” and deploy when you push to Git.[Netlify guide]
However, the docs still describe this in the context of Git-based automatic deploys, not a purely manual mode.
The knowledge sources do not explicitly describe:
- Disabling auto-deploys while keeping the GitHub connection.
- A documented “manual upload only” workflow for Netlify in the Astro docs.
- Any credit-usage or billing strategies.
Given that limitation, the Astro docs can only reliably suggest:
- Continue local development and local builds
Useastro buildlocally as much as you want; this doesn’t touch Netlify or your credits.[Quick deploy]
-
Use GitHub for backup without relying on Netlify’s auto-detection
Astro itself doesn’t require Netlify to be connected to GitHub. You can:- Keep committing and pushing to GitHub for backup.
- Only set up Netlify (via UI or CLI) when you’re ready to accept deploys that may consume credits.[Netlify guide]
-
When you do deploy, ensure the standard Astro settings
Whether via UI or CLI, the documented config is:- Build command:
astro buildornpm run build - Publish directory:
dist[Netlify guide][Quick deploy]
- Build command:
Because the docs don’t cover Netlify’s credit model or how to pause/disable auto-deploys while keeping the GitHub link, I can’t reliably describe that part. For that specific control (e.g. “only deploy when I click a button” or “don’t build on every push”), you’d need to consult Netlify’s own documentation or dashboard settings, which are outside the Astro docs.
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
@split fern Kapa.ai is still learning and improving, please let me know how I did by reacting below.
use github actions to deploy, I have been using the same to bypass cloudflare build limits.
Thank you, I will try it later. Do you do it with schedule or manual?
Currently I use workaround by disable Netlify auto publish (fortunately preview deploy is free). Now when the website is ready to live, I just hit publish. If not yet ready, I have live preview for visiting the website on another device.