wrangler-action icon indicating copy to clipboard operation
wrangler-action copied to clipboard

Support version preview urls in Cloudflare workers

Open Phoenixmatrix opened this issue 1 year ago • 10 comments

Cloudflare Workers now support preview urls similar to Cloudflare Pages. Unfortunately wrangler's output for those is slightly different than the output from Pages, so the regex doesn't catch it to store in deployment-url.

Example of Wrangler's output:

Version Preview URL: https://an21s8iyi-worker-test.mydomain.workers.dev/

Without that, it's difficult to get access to the url in a version preview (it's available in the output, but its tough to capture it to use elsewhere in my GitHub action).

Phoenixmatrix avatar Oct 15 '24 21:10 Phoenixmatrix

We can pull this from wrangler artifacts. https://github.com/cloudflare/workers-sdk/issues/7240

nprogers avatar Nov 12 '24 17:11 nprogers

Blocked on https://github.com/cloudflare/workers-sdk/issues/7240

jahands avatar Nov 18 '24 19:11 jahands

btw it seems like preview urls are not correctly disabled on deploy even though I've specified workers_dev = false as described here in the docs: preview url docs It only disables the worker.dev url, not the preview url. I'm not sure where to report this.

Meai avatar Dec 16 '24 07:12 Meai

btw it seems like preview urls are not correctly disabled on deploy even though I've specified workers_dev = false as described here in the docs: preview url docs It only disables the worker.dev url, not the preview url. I'm not sure where to report this.

Also met the problem here.

crzidea avatar Dec 29 '24 11:12 crzidea

https://github.com/cloudflare/workers-sdk/pull/7243 has been merged, isn't it time to unlock this one?

rimmer avatar Mar 06 '25 21:03 rimmer

Any updates on this issue? Would love this feature!

RowenTey avatar Mar 16 '25 07:03 RowenTey

Any updates on this issue? Would love this feature!

@RowenTey I am sure this issue has been solved, and the document has been updated.

https://developers.cloudflare.com/workers/configuration/previews/#disabling-preview-urls-in-the-wrangler-configuration-file

crzidea avatar Mar 25 '25 08:03 crzidea

Any updates on this issue? Would love this feature!

@RowenTey I am sure this issue has been solved, and the document has been updated.

https://developers.cloudflare.com/workers/configuration/previews/#disabling-preview-urls-in-the-wrangler-configuration-file

Yep sorry, just tested it out and got it to work!

RowenTey avatar Mar 26 '25 13:03 RowenTey

The original issue is still relevant, is there any progress? It would be great to have this to have previews for workers

steebchen avatar Apr 22 '25 07:04 steebchen

@nprogers @jahands I would truly appreciate any update on this issue 💯

BPreisner avatar Jun 10 '25 21:06 BPreisner