Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow selective deploy within directory tree #21

Closed
fool opened this issue Feb 8, 2017 · 4 comments
Closed

allow selective deploy within directory tree #21

fool opened this issue Feb 8, 2017 · 4 comments

Comments

@fool
Copy link
Contributor

fool commented Feb 8, 2017

Requested by a customer but perhaps has wider appeal than one person:

an ability to select files to exclude or include during a deploy of a directory.

Perhaps it could behave like .gitignore, where you could set patterns (eg node_modules/* or *.o) not to be deployed?

@dimkir
Copy link

dimkir commented Nov 2, 2017

Was looking around your documentation for this feature (most simple use case is that when I make static website on my dev machine, and want to publish it via netlify deploy, I usually don't want node_modules to be uploaded.

Surge.sh have done it in very simple way: by adding a custom ignore file and some reasonable defaults.

Is something like this possible in today's netlify-cli ?

@fool
Copy link
Contributor Author

fool commented Nov 2, 2017

Nothing like that exists, but we'd accept contributions :)

All development going forward is going to be on the Go client: https://github.com/netlify/netlifyctl so if you're hoping for it to get implemented by us - that's the one to file the feature request on.

bcomnes added a commit that referenced this issue Aug 16, 2018
@bcomnes
Copy link
Contributor

bcomnes commented Aug 27, 2018

The upcoming 2.0.0 cli ignores node_modules and .dotfiles (except for .well-known) by default. Generally, it's better to copy the files you want hosted into a deploy folder than it is to deploy in folders that have files you want ignored. We may expand this capability in the future though.

@bcomnes bcomnes closed this as completed Aug 27, 2018
eduardoboucas added a commit that referenced this issue Apr 18, 2022
* fix: adjust Edge Functions deploy message

* refactor: reinstate internal count
@jimniels
Copy link

Would be nice to have this.

Certain files are already being excluded and the js-client used to have a deploy method which would allow you to specify a filter function for filtering out files you didn't want.

Would be nice to have some kind of glob pattern you could pass in that excludes files matching a certain pattern in your deploy dir, i.e.

netlify deploy --dir ./build --exclude "{**/_nested-name}"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants