Add docs to a pytorch.github.io/doc/tag directory when repo is tagged (#45204)
Summary:
In coordination with jlin27.
This PR is meant to build documentation when the repo is tagged. For instance, tagging the repo with 1.7.0rc1 will push that commit's documentation to pytorch/pytorch.github.io/docs/1.7.
Subsequently tagging 1.7.0rc2 will override the 1.7 docs, as will 1.7.0, and 1.7.1. I think this is as it should be: there should be one, latest, version for the 1.7 docs. This can be tweaked differently if desired.
There is probably work that needs to be done to adjust the [versions.html](https://pytorch.org/docs/versions.html) to add the new tag?
Is there a way to test the tagging side of this without breaking the production documentation?
As an aside, the documentation is being built via the `pytorch_linux_xenial_py3_6_gcc5_4_build` image. Some projects are starting to move on from python3.6 since [it is in security-only support mode](https://devguide.python.org/#status-of-python-branches), no new binaries are being released.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/45204
Reviewed By: zhangguanheng66
Differential Revision: D23996800
Pulled By: seemethere
fbshipit-source-id: a94a080348a47738c1de5832ab37b2b0d57d2d57