🚀 Feature Request: Pages publish should support --site-exclude/--site-include #13538
Replies: 7 comments
-
Beta Was this translation helpful? Give feedback.
-
|
It's very strange that this is not supported, currently there's only this hardcoded array: workers-sdk/packages/wrangler/src/pages/validate.ts Lines 44 to 53 in 0c0374c Having a |
Beta Was this translation helpful? Give feedback.
-
|
While this won't be added to Pages, you can customise what is ignored at upload in Workers Assets using an .assetignore file: https://developers.cloudflare.com/workers/static-assets/binding/#ignoring-assets |
Beta Was this translation helpful? Give feedback.
-
|
This is quite disappointing when Assets isn't yet fit for purpose and migration from Pages. Until static config and a way better DX around building, preview links, etc. I can't recommend anyone migrate to Assets. Especially when in some cases like the Should folks consider Pages effectively deprecated at this point? |
Beta Was this translation helpful? Give feedback.
-
|
In the interest of not jumping the gun, i'll keep this issue open! Didn't mean to confuse anyone about Pages, just a PSA in case you're in a position to move to Workers Assets, that does currently have a customisable ignore file. Sorry for the confusion 🧡 |
Beta Was this translation helpful? Give feedback.
-
|
It was made abundantly clear that this won’t be added even via a public pull request. Is that an option again, given there’s a workers implementation that can be extended? |
Beta Was this translation helpful? Give feedback.
-
|
I still think this is a good idea. Maybe I should be using Workers Assets? But that seems weird if I really do just want to host static pages. I don't want to make some sort of mistake and wind up getting charged for worker compute when the site was intended to be fully static. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
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 publishappears 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 publishcommand, for whatever "workers" are, has a convenient--site-excludecommand which addresses my need exactly. However it is not supported forwrangler pages publish: https://developers.cloudflare.com/workers/wrangler/commands/#pagesThis 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 pagesadopt a file include/exclude pattern system? Using the tool without this feature is going to be pretty awkward.Beta Was this translation helpful? Give feedback.
All reactions