Ok thanks - you mean somehow support the different versions directly within the docs tree itself? That makes sense, although I’m not sure how I’d achieve that in my particular situation.
I also had an online chat with GitHub Pages support about this issue. They said “You can deploy [the static docs] from the docs folder, gh-pages branch, or the root of the master branch.” But the important point about my situation is that the static HTML is not currently committed anywhere. The static HTML is generated automatically as part of the build process itself (by sphinx, which generates API docs from specially formatted comments in the Python source code).
So it sounds like I’d need to create a separate repo just for my static docs and update this repo automatically as part of my build pipeline. In other words, delete all the static docs from the previous build and then commit all the newly generated static docs from the current build. Is this what you are suggesting?
I suppose I could create one repo for each version of the docs too, maybe (yuck - ideally they’d just be on different release tags of the same repo).