Github Pages Setup


  1. Create Github personal account. Once the account is created go to your profile and select settings - developer settings. Create a personal access token and copy and paste your username and access token into YouDoCMS set up.
  2. Create a default repository under your personal account. Enter the repository name into our setup page and test settings. This will verify the access token is working correctly.

    prefs createbucket

  3. Next go to the repository choose settings - pages. In order to publish your site as a pages static website choose the source. By default this will give you an option for the "main" branch. This will create static site hosting for the pages uploaded to the main branch within the repository. At this point the URL for the static site will be as follows:

    prefs listbucket

  4.  To publish your site to a custom domain ie a non github domain return to your profile - settings - pages and create custom domain. This will provide a txt record to include as a DNS entry to confirm ownership of the domain. This must be done under the profile not the repository settings. Create a text record then verify.
    _github-pages-challenge-username.www6 = record name
    "123456123456123456123456" = value
  5. After you have successfully verified the ownership of your domain you can create the custom domain. To do so create another DNS entry.  Enter the domain prefix into YouDoCMS github pages set up. This will give you the name and value for your CNAME record. Create this record with your DNS provider. DNS changes can take anything from five minutes to an hour to propagate.
  6. After creation of the DNS records go to repository - settings - pages and enter the custom domain name including the prefix. Pages will now verify that the DNS entries are correct and publish the site using the custom domain name.


  7. Lastly after the SSL certificate has been published and is available select the option to enforce https.


Creating the site for an organisation involves an additional step. When you create the custom domain you do so under the organisation settings and not the user profile settings. Enter the organisation name in YouDoCMS - pages - settings. This will generate a different CNAME record using the organisation rather than the user profile. Lastly attach the custom domain to the organisation site as described above.