DOC: create 1.12 docs from a tag like v1.12.2rc1 (#71985)
Summary:
brianjo, malfet
The documentation team would prefer the [documentation versions] to only have a major.minor version, not major.minor.patch. See also pytorch/pytorch.github.io#921
The regex can be tested by this bash 1-liner (where $tag is something like `v10.1225.0rc1`)
```
echo $tag | sed -e 's/v*\([0-9]*\.[0-9]*\).*/\1/'
```
I have lost track a bit, is the CI run for a tag actually building and pushing documentation?
Pull Request resolved: https://github.com/pytorch/pytorch/pull/71985
Reviewed By: mrshenli
Differential Revision: D33845882
Pulled By: malfet
fbshipit-source-id: 3cb644d8b01f5ddf87c0ac7c43e23e9fd292d660
(cherry picked from commit f884bd86740547e3164adde7bdc6318b944f9bdb)