0

I have two Github repos, one for a Github Pages website with the master branch containing the static site generator source for the website, and another repo containing a Git submodule referenced by the master branch of the website repo.

Ideally I need to call the Wercker build procedure on the Github Pages repo if there are changes to the master branches in either of the two Github repos. Please can you let me know if it's possible to use webhooks on two different repos in this manner, and if so, how do I setup the extra webhook to build the website repo when the submodule repo changes?

neutreno
  • 694
  • 1
  • 5
  • 10

1 Answers1

2

A tricky one. Wercker allows you to fire a build with an API request so you may be able to set up something that hits that API endpoint to trigger your GitHub Pages repo build when your other repo is pushed to.

Do you absolutely need the Pages site to be in a separate repo? You can have the GitHub Pages source in a gh-pages branch in your main repo, or even have the source files in a /docs subdirectory in your master branch now too (I think this is a recent GitHub Pages feature).

ocean
  • 1,335
  • 15
  • 26
  • Thanks, I settled on using the Wercker API workaround to trigger builds since my project must use a submodule from another Github repo. This kind of setup is very common with static site generators (SSGs) because the submodule is used to inherit the theme whilst supporting theme updates. – neutreno Oct 31 '16 at 02:41
  • I'm in exactly the same situation. Could you share the code you used for the API workaround? – vishvAs vAsuki Dec 24 '18 at 04:13