cloudflare / workers-sdk

⛅️ Home to Wrangler, the CLI for Cloudflare Workers®
https://developers.cloudflare.com/workers/
Apache License 2.0
2.68k stars 702 forks source link

🚀 Feature Request: Pages publish should support --site-exclude/--site-include #3176

Open mcclure opened 1 year ago

mcclure commented 1 year ago

Describe the solution

Context: I have a static web page I am attempting to migrate from Amazon S3 to Cloudflare Pages. With Amazon, there was a simple program I could run on a directory and it would do something like an rsync (IE upload changed files only) of the directory to the server. CloudFlare pages appears to prefer a situation where I push a git repo and CloudFlare checks out the git repo and runs a "builder". I would prefer to just upload you the files. I have a source control repo for the site but it is not practical to give you access to it.

Problem: I have hit a blocker because wrangler pages publish appears to only be able to upload complete directories. However, I have a .hg (source control) subdirectory in the directory. That should absolutely not be uploaded.

The wrangler publish command, for whatever "workers" are, has a convenient --site-exclude command which addresses my need exactly. However it is not supported for wrangler pages publish: https://developers.cloudflare.com/workers/wrangler/commands/#pages

This is a feature the amazon equivalent does have (--exclude) and is a pretty standard feature for most archival/uploading tools (rsync, zip, etc).

Expected behavior: Could wrangler pages adopt a file include/exclude pattern system? Using the tool without this feature is going to be pretty awkward.

lrapoport-cf commented 2 months ago

cc @tanushree-sharma