Connect your Git repository to Cloudflare Pages or Workers
π
Cloudflare GIT Integration (BEST/RECOMMENDED)
This option allow the in-built Cloudflare Git Integration. Delete deployments to reduce to one(1) active production deployment, then connect Git natively via Cloudflare dashboard
π
Direct Upload GIT (NOT GOOD)
This option allows Generating a GitHub Actions workflow to auto-deploy (with custom file "deploy.yml") your existing Cloudflare project on every push. This is custom option but you lose the Cloudflare integration benefits.
Connect Repository
My Projects
1
Provider
2
Repository
3
CF Project
4
Build
5
Generate
Select Git provider
GitHub
GitLab
Bitbucket
Select repository
π
No repos loaded. Click Refresh.
Select Cloudflare project
π Pages
β‘ Workers
Click Load projects to fetch from Cloudflare.
Use if your project isn't listed above
Build settings (all optional)
βΉοΈ Leave everything empty for plain Cloudflare Pages/Workers projects with no build step. The workflow will deploy files directly.
π Review & generate workflow
π
Workflow ready!
Step 1 β Add workflow file to your repo
Create or replace .github/workflows/deploy.yml with the content below.
β οΈ Delete deployments until only one remains, then connect Git via CF dashboard. Credentials read from server secrets (CF_API_TOKEN, CF_ACCOUNT_ID) or β Settings.
β Select a Cloudflare Pages project
No projects loaded
π
Click "Load projects" to fetch your Cloudflare Pages projects.
β‘ Delete options for:
π¦ β
oldest first
Leave empty to delete all deployments
βΉοΈ Production deployment will be force-deleted in a final pass after all others are cleared. In case, if you may not be able to delete last active one (1) production deploymentβ this is normal. Eventhough active one (1) deployment cannot be deleted, the best thing is that you can able to connect Git through Cloudflare (CF) Dashboard β Pages & Workers β[select a project]β Settings β Build β Git repository β Connect. The "Settings> Build" section is only visible when only one(1) active deployment remains.