Github integration after deploying with Wrangler
I deployed directly with wrangler, and would now like to deploy preview branches automatically.
Cloudflare already has access to my gh account (I have the app). If I push the repo up it's not clear to me how cloudflare will identify and deploy it. I don't see a way to configure this in the CF dashboard.
1 Reply
I'm having the same issue ... trying a few approaches. Just posted my own question on this.
I'm also struggling with the Github branches thing even if you setup a new project.
I've switched to using Github Actions, and they work really well.
you just need to create a file
.github/workflows/pages-deployment.yaml
with this sort of content
You'll need to get CLOUDFLARE_API_TOKEN and CLOUDFLARE_ACCOUNT_ID from the Cloudflare Dashboard and add them to the Github secrets, it already has access to GITHUB_TOKEN
Been working great for me, deploys any master merges to production and any other branches to preview.