The current process for deploying to gh-pages was set-up according to the gist. Though it is simple and easy to understand, the personal access token generated by a user and has write access to all the repos that the particular user has write access to. We can do this better by using deployment keys which are created per repo and only have write access to a single repo.