← Back to Blog

GitHub + Cloudflare Pages: Deploy by Push

My goal was boring: one git push updates the site. No FTP, no file managers. Here's the path, including the bumps.

1. Trust. Added my SSH key to GitHub as an Authentication key — the wrong type means GitHub silently refuses it. Verified with ssh -T git@github.com.

2. Push. Made an empty public repo, then git init -b main && git add . && git commit && git push -u origin main.

3. Connect. Cloudflare Pages: Workers & Pages → Create application → connect a repository. Build command blank, output directory /.

4. Domain. Added cerfly.net under Custom domains. An old CNAME (cerfly.net → cerfly.github.io) was squatting on the name — deleted it, retried, activated.

Total cost: zero. The loop now is git commit + git push, and Cloudflare rebuilds and deploys for me.