In a project I have where I generated pages based of code in my master I would have two folders that both were the same repo, one just stayed as master and the other as gh-pages. Meaning I could automate moving things and then pushing from that directory.