Set up a Docs Mirror in China

Hello, I’m a student from China.
Visit the offical website is very painful for the Great Wall between China and the world. It is not stable and slow and prevent beginner from reading the veritable document. So, I want to set up a Docs Mirror in China.
But It’s hard to detect when the CI should pull source code and build from it.
Can I set up a WebHook in offical GitHub repo?

2 Likes

cc @smth is this possible?

unfortunately a webhook might not be possible (I’ll have to check).
How about just polling? (you can poll every minute looking for new commits)

Thanks for your reply.
Of course, polling is a way which I have finished developing.
Adding a hook is just a way, not the ultimate goal. The difficulty with this project is that I don’t know which commit needs to be built. I have found that only the latest commit of the latest, released(not dev/alpha/beta) branch will be built and pushed to the offical website.

Is it right?
在 2018年8月24日,上午10:10,smth noreply@discuss.pytorch.org 写道:

I have found that only the latest commit of the latest, released(not dev/alpha/beta) branch will be built and pushed to the offical website.

This is correct.

If you simply replicate our website GitHub - pytorch/pytorch.github.io: The website for PyTorch this should be sufficient for you to mirror the docs page as-is. You do not have to build the docs yourself.

You can run the mirror with jekyll plugin on your server locally as described here: Testing your GitHub Pages site locally with Jekyll - GitHub Docs

Ah, this is really very convenient. Thanks for your help😆

在 2018年8月24日,上午11:59,smth noreply@discuss.pytorch.org 写道: