Support Forums

Is there an easy way to add deployment preview Github Integrations for each content repo in a multirepo setup?

Hi! Thank you so much for your time in advance!

We have adopted Netlify to serve our product’s docs and website recently and so far it works like a charm, our contributors on Github particularly love the deployment preview (or featurepeek?) feature, which really helps improve the documentation contribution workflow.

However, recently we decided to move forward with a multi-repo setup, which brings a challenge to us when it comes to the deploy preview feature:


we have a (C++/Python) application repo storing source code, and a separate (Docusaurus/ReactJS based statically generated website) website repo hosting the website and (markdown) docs and other static assets.

current workflow

We ask all documentation contirbutors to go to our (Docusaurus-based) website repo to add/update the markdown files directly, and when they make a Pull Request, the Netlify bot will kindly comment on the PR, posting the preview link or logs. This is smooth.

Desired workflow

We plan to move our source content (i.e. the markdown files) to our application codebase (another repository) from the website repo, in order to encourage source code contributors update the docs simultaneously, and we will create a cron job that syncs/copies the markdown content from the application repo back to the documentation website repo nightly.


In short, we want whoever updates the docs content in our application repo to be able to see a preview website in the Pull Requests. This is not feasible now since the Netlify build hook is connected to the website repo not the application repo. However, it won’t work either if we update that hook since the application repo has nothing but a list of markdown files (i.e. lack of Javascript/CSS/HTML build context).

I’m wondering if this is something achievable on the Netlify side without requiring us to build some custom Github hooks/Actions, and it would be surprising if we are the first to run into similar challenges, since this is similar to having multiple content-only blog/news/tutorials repos connected to one major website repo, with the requirement that all PRs in all those multi-repos triggering deploy-previews :thinking:

(It seems that Netlify CMS might be a good candidate for such requirement? But we want to keep our current Git based workflow than asking our contributors adopt the editor-view pipeline, so not sure if it’s an overkill)

Please let me know if there are any resources that may help! Thanks!!

The only possible workflow that comes to my mind if using a monorepo, that is a single repository for the app as well as docs’ website. You could keep the entire docs in their own folder in the app repo, and configure Netlify to build from that folder. Is this possible with your setup?

1 Like

Thank you for your prompt reply :grinning_face_with_smiling_eyes:

I’m afraid a monorepo solution is not something we could easily apply to our use case, we went for the multi-repo to not only minimize the noise created by the website (almost weekly security warnings about npm packages, mixing frontend code with backend and compiler code), but separate current and future content manifests from their corresponding building context. Ideally, we want to have a “Hub” build context, i.e. a static website repo deployment that pulls from multiple source repos as one of their pre-build steps, which also connects to Netlify, and generates deploy-previews on Pull Requests against all of the source repos.

That said, would it be possible for us to build a custom Github Bot/Action that leverages Netlify deploy-previews API (if there is one already) so it can fetch the random-generated deploy preview URL and comment on our content repos?

Thank you!

I’m actually having a hard time understanding this type of a workflow so anything I suggest might not be the best thing. If a monorepo is not possible, maybe you could take a look at using different branches in the same repo. The branches could be detached from each other, so the app and docs could still live in the same repo, yet stay isolated to some extent. Then, Netlify could connect to the same repo and easily add the notifications that you need.

Netlify can only build deploy previews for the repo connected to it as we have no other means to know that a PR has been opened on a repo.

1 Like