Free Deployment with Cloudflare Pages — GitHub Integration, Automatic Deployment, Domain Connection

Illustration showing Cloudflare Pages dashboard with GitHub repository connected and automatic deployment flow visualization

Once you've built an app, the next step is making it accessible on the internet. In the past, this required renting a server or going through complex configuration — neither of which is friendly to non-developers. Today you can deploy for free in just a few minutes. Cloudflare Pages connects to your GitHub repository and automatically deploys every time you push new code. This post walks through the full flow — from Antigravity to GitHub to a live URL on the internet.

▶ Table of Contents (click to expand)
  1. GitHub Integration Setup — How to Connect Cloudflare Pages to Your Repository
  2. Automatic Deployment — Settings That Update Your App Every Time You Push Code
  3. Domain Connection — Making Your App Accessible at Your Own Custom Address
  4. Q&A — Frequently Asked Questions
  5. Conclusion

GitHub Integration Setup — How to Connect Cloudflare Pages to Your Repository for the First Time

To use Cloudflare Pages, you need a Cloudflare account. You can sign up for free at cloudflare.com.

Starting Your First Deployment

After signing up, go to the Workers & Pages section in the dashboard. Click the Create application button in the top right.

Cloudflare Workers and Pages dashboard with Create application button

This opens a screen where you choose between Workers and Pages. At the bottom of that screen, look for the text "Looking to deploy Pages? Get started". Click the Get started link.

Cloudflare Ship something new screen with Looking to deploy Pages Get started link at bottom
Cloudflare Pages Get started screen with Import an existing Git repository option

Connect your GitHub account and your list of repositories appears. Select the project repository you built in Antigravity and pushed to GitHub.

Cloudflare Pages Deploy a site screen with GitHub repository selection

Workers vs Pages — Two Services with Different Purposes

Aspect Cloudflare Pages Cloudflare Workers
Purpose Static websites, frontend app deployment Serverless backend logic, API handling
Best for HTML/CSS/JS sites, React/Next.js apps Database integration, auth, external API calls
Server required No No (serverless)

This post covers Cloudflare Pages — deploying a frontend app built in Antigravity by connecting it to GitHub. Features that require server-side logic, such as login, payments, or database integration, cannot be handled by Pages alone. Those require Workers or a separate backend service such as Firebase.

Build Settings by Framework

After selecting a repository, you'll see a build settings screen. The settings vary depending on the technology used in your project.

  • Plain HTML, CSS, JavaScript — No build settings needed, deploys as-is
  • React or Next.js — Select the framework and build commands are filled in automatically
  • Not sure — Ask the Agent Manager: "What build settings do I need for Cloudflare Pages?" The AI analyzes the current project and tells you

When you're done with settings, click Save and Deploy and the first deployment begins. It takes 1–3 minutes, and once complete, an accessible URL is generated. Enter that URL in a browser and you can access your app from anywhere on the internet.


Automatic Deployment — Settings That Update Your App Every Time You Push Code

One of Cloudflare Pages' most powerful features is automatic deployment. With the GitHub repository connected, every time you commit and push code, Cloudflare Pages automatically builds and deploys the new version.

The Flow from Code Change to Deployment

When you modify a feature in Antigravity and tell the AI "push the changes to GitHub," the commit and push happen automatically. Cloudflare Pages immediately starts deploying the new version. 2–3 minutes later, the changes are live at the deployment URL.

Branch-Specific Preview URLs

Branch-based deployment is also supported.

  • main branch — Automatically deployed to the production URL
  • Other branches — A separate temporary preview URL is automatically generated

For example, push a feature/new-login branch to GitHub and a temporary URL just for that branch is created. Test the new feature at that URL, and once it looks good, merge it into main — and it automatically goes live in production.

Deployment History and Rollbacks

You can view deployment history in the Cloudflare Pages dashboard. See at a glance when each commit was deployed and whether deployments succeeded or failed. Rolling back to a previous deployment version takes just a few clicks. Being able to quickly return to a previous state when something goes wrong lets you deploy experimentally without worry.


Domain Connection — Making Your App Accessible at Your Own Custom Address

The URL Cloudflare Pages provides by default is in the format projectname.pages.dev. That's perfectly usable on its own, but connecting your own domain gives a more professional look.

How to Connect a Custom Domain

Cloudflare Pages supports custom domain connections for free. You need to purchase a domain separately, but you can buy one through Cloudflare or bring a domain you purchased from another registrar.

The connection process is straightforward. Go to the Custom Domains tab in your Cloudflare Pages project settings and enter the domain address you want to connect. Cloudflare walks you through the DNS settings. Set the DNS records at your domain registrar to the values Cloudflare provides and the connection is complete.

If you purchased the domain through Cloudflare, the process is even simpler — everything happens within the same account, so it's just a few clicks.

Automatic SSL Certificate

SSL certificates are issued automatically too. A secure https connection is applied automatically at no extra cost. To summarize the full deployment stack:

Build code in Antigravity → Commit to GitHub → Cloudflare Pages automatically builds and deploys → A service accessible from anywhere on the internet at your custom domain is complete

The fact that this entire stack runs for free is its biggest advantage.


Q&A — Frequently Asked Questions

Q. Is Cloudflare Pages completely free?

The free plan is more than enough for personal projects. It includes custom domain connection, automatic deployment, SSL certificates, and branch preview URLs at no cost. You only need to consider a paid plan if you see very high traffic or need advanced features.

Q. Can I use Cloudflare Pages without GitHub?

Yes — you can upload files directly using the Direct Upload method. However, automatic deployment requires GitHub or GitLab integration. If you're using Antigravity, the GitHub integration approach is far more convenient.

Q. What if my app loads slowly after deployment?

Cloudflare's global CDN network provides fast response times by default. The most effective ways to improve loading speed are optimizing images to WebP format and reducing unnecessary JavaScript.

Q. How does it compare to Vercel or GitHub Pages?

All three services offer free static site hosting. Cloudflare Pages excels in CDN performance and security, Vercel has superior Next.js integration, and GitHub Pages is the simplest to set up. For Antigravity projects, Cloudflare Pages is a well-rounded choice overall.


Conclusion

Cloudflare Pages is one of the simplest ways to deploy a web app for free by connecting it to GitHub. Repository connection, automatic deployment, and custom domain connection are all provided free of charge. When you deploy code you built with Google Antigravity and managed with GitHub through Cloudflare Pages, the full pipeline from AI coding to deployment is complete. Set up this flow of automatic deployment on every commit once, and you can focus entirely on building from that point on. The next post covers the real-world process of building a SaaS MVP from start to finish.

Have you ever deployed something? What did it feel like the first time you made your app public on the internet? Let us know in the comments.

Sources: Cloudflare Official Documentation — Getting Started with Cloudflare Pages / Alex Finn — Google Antigravity: From Beginner to Expert in 14 Minutes

👤 Author: 20eung (Network Engineer / Self-taught AI coding tool experimenter)

🔗 GitHub Portfolio | isthe.info Blog

📅 First published: 2026-05-15 | 🔄 Last updated: 2026-05-30

📝 Changelog: h1 title added, FAQ section added, author information added, Cloudflare Pages deployment UI change reflected, step-by-step screenshots added, Workers vs Pages comparison added