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 until last one(1) active production deployment remains, then the "Settings> Build> Git repository" will be visible and able to 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
βΉοΈ The last active one (1) production deployment cannot be deletedβ this is normal. When active one (1) deployment remains, the "Settings> Build> Git repository" will be visible to connect Git through Cloudflare (CF) Dashboard β Pages & Workers β[select a project]β Settings β Build β Git repository β Connect. The "Settings> Build> Git repository" section is only visible when only one(1) active deployment remains.