Deploying Preview & Production

I have a Cloudflare Pages app.
So far I've been deploying from the wrangler CLI straight to prod, but I want to transition to a pipeline that's driven from Github.

Firstly: it seems if you started using the CLI you can't transition to using Github as a trigger for deployment.
Secondly: if you do setup a trigger using Github pushes it doesn't sync the static assets and the build fails

Is this correct?

I've also been looking at using Github Actions, but I can't see a way to differentiate between preview and prod. I want my merges to mast to go to prod and any other branches to trigger a preview build.
Please help, big project going properly live soon and the directors are already demoing the prod environment so I don't want to mess this up.
Was this page helpful?