-
Notifications
You must be signed in to change notification settings - Fork 300
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
Add exclude directories option #101
base: main
Are you sure you want to change the base?
Conversation
Hi @pavletto Thanks for the PR! Question: could you achieve the same using this other approach? https://cpina.github.io/push-to-another-repository-docs/faq.html#how-can-i-copy-only-some-files-only-some-directories-exclude-some-files-etc |
Case in FAQ actural for overriding folders in source repository. But my case - overriding in destination repo by other github-action-push-to-another-repository. I have 3 repo and your action build all content after building in one destination. But one of that has target ( |
@cpina I'm facing this same issue and this would solve it for me. Are there any issues with this PR that I could help out with? edit: Not sure if it helps, but I setup my actions to run |
@@ -54,6 +54,10 @@ inputs: | |||
[Optional] create target branch if not exist. Defaults to `false` | |||
default: false | |||
required: false | |||
exclude-directories: | |||
description: '[Optional] The directory to exclude for remove from remote repo' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could probably be changed to say something like
ignore-directories:
description: '[Optional] whitespace delimited set of directories to ignore.'
It feels like a different naming makes it more obvious that the directories will be ignored in the overall process.
I had a similar issue where I wanted to exclude a lot. The workaround I used in the end was to simply use a |
Hello. I want to thank you for this useful action. I'm trying to use it to create website github pages for our project.
While working on it, I encountered that when I try to update the repository root, some directories that I also created with this action get overwritten (similar to the problem in this issue).
So I added the ability to select which directories to exclude from the rewriting process with the
exclude-directories
parameter.I do this with thegit restore
commandI also added removing
.git
directories from nested directories, because if you don't, they will look like git submodules. You may have done this in some special way, and I should do it some other way.I hope these changes will be helpful