ci on workers project

Hi folks. I'm creating a Remix app using Cloudflare Workers as a learning exercise. The template I'm using: https://github.com/vhscom/remix-cloudflare-template I'm able to run wrangler deploy on this project to run the custom build and deploy the running app to a workers.dev domain. Though when I try and hook this app up to build from the GitHub repo via the Workers & Pages section in the Cloudflare Dashboard it builds and deploys to a pages.dev domain and not a workers.dev domain yet the Preview URLs never resolve. Could that be because Workers projects (those with main = "index.js") are not yet supported by Cloudflare Pages?
No description
No description
4 Replies
vhscom
vhscomOP3mo ago
Build successful, assets published, preview URL generated and very non-functional as shown in the attached.
James
James3mo ago
They're resolving - they're just 404ing It looks like you're using Pages for a Workers project though - that's not going to work how you expect.
James
James3mo ago
You'll need to run the deploy script from that template, or you could try to hook this up with Workers CI (not Pages CI): https://developers.cloudflare.com/workers/ci-cd/
Cloudflare Docs
CI/CD · Cloudflare Workers docs
Set up continuous integration and continuous deployment for your Workers.
vhscom
vhscomOP2mo ago
Somewhere between cloudflare pages, the cloudflare pages functions beta, workers, and the various ways to hook things up, and deploy, one would think this would be covered in the examples—maybe it is and I just missed it. If it's not, this is an area for improvement.

Did you find this page helpful?