-
Notifications
You must be signed in to change notification settings - Fork 191
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
Support running a custom script before adding and committing #331
Comments
@tschaub would you be interested in me providing a PR for this? |
Can you describe a bit more about what you are trying to accomplish (maybe with an example)? |
Yeah sure! I'm building each branch of a project to a subdirectory of Now I want to remove folders of deleted branches in order to not have stale previews that nobody cares about anymore. |
Now I really like that Thats why I thought that some kind of hook would work best for me while not adding to much knowledge about the target project to this tool |
Looks like what I need too for the same use-case (per-branch preview with auto cleanup on merge to master). |
As I said I would love to provide a PR for this (I already had this working via monkey-patching). @tschaub let me know If you think this would be a good addition. |
Sure. |
I used this on a propriatorey project from one of my clients, so I can't point you directly. But I just realise that this is good material for a blogpost. I'll write it down and add a link here. |
Here is an example repo deploying a jekyll build of each branch to /preview/[branchname] and main branch to / |
Here is the complete walkthrough: https://xiphe.net/blog/automation/preview-every-branch-with-ghpages.html |
@Xiphe this is awesome! Super great addition and awesome article. |
I would really like to execute manual cleanup after new files have been copied but before everything is added.
Ideally I could just hook in a function that receives the
git
instance.API proposal
lib
cli
gh-pages --beforeAdd="./myCustomScript.js"
Let me know what you think about this. I'd happily submit a PR.
The text was updated successfully, but these errors were encountered: