2

My project initially used Github and a private repository to host the code base for the company i've been working for. In order to separate my account from the code I developed for that company, I recently stumbled upon Google Cloud Platforms' Cloud Source Repository: https://cloud.google.com/source-repositories, a fully managed Git platform.

For documentation purposes, I started to use ReadTheDocs. However, whilst it's a breeze to add Webhooks to Github and thus update my ReadTheDocs deployment whenever necessary, I have zero ideas how to achieve the same with the GCP product.

The only scenario I can see, which is however overly clunky is to use Cloud Build to trigger a container that runs readthedocs and then pushes it over to their platform.

Am I missing something here? Thanks!

  • GCP Source Repos don't expose "regular" Git webhooks, instead they allow you to publish messages to pub/sub topics. https://cloud.google.com/source-repositories/docs/quickstart-adding-pubsub-notifications You might need to do some extra integration to direct this pub/sub to ReadTheDocs webhook: https://docs.readthedocs.io/en/stable/webhooks.html#webhook-creation from that point it's all business as usual as with any other Git repo. – Anton Apr 29 '20 at 20:28
  • very interesting. Need to check this out. Thanks! – delarond2004 Apr 30 '20 at 12:10

1 Answers1

1

EDIT: given that Readthedocs doesn't really support any repository that is non-public, I ended up going an entirely different, and perhaps overkill route:

I already had a VM inside my GCP deployment which I repurposed as Apache webserver. On this VM, i set up a cronjob that fetches the code updates and then runs sphinx to build the HTML documentation, which is then made available via the IP address within our corporate network.

That way we prevent leaking any documentation outside, although i'd love to host that stuff on readthedocs... :)