Creating staging and production versions of a site on Github Pages

后端 未结 1 1370
北荒
北荒 2021-02-07 11:09

I want to use Github Pages to publish a production website (at, say, www.example.com) and also a staging version of the same site (at, say, staging.example.com).

I\'ve s

相关标签:
1条回答
  • 2021-02-07 11:15

    Pulled from comments above:

    [M]erge the staging git branch into the production branch and push[.] You could just keep the CNAMEs permanently pointing to their respective repos, but manipulate the repos separately.

    Comment originally by Jonathan Chan

    Do as @JonathanChan says: maintain two separate branches, then hijack your CNAME file in each one. This way local changes (to the CNAME) will not be committed to the repository.

    0 讨论(0)
提交回复
热议问题