Docs: mkdocs deploy with subdomain - adeemacdowell/adeemacdowell.github.io GitHub Wiki

Start a new github repo

Clone it to local

Create a virtual env using pyenv

$pip install mkdocs

$mkdocs new my-project

$mkdocs serve

Open up http://127.0.0.1:8000/

$mkdocs build

add /site to gitignore

$mkdocs gh-deploy

Check your files upstream

Also check that a gh-pages branch now exists

Go to your domain provider dashboard

Create 4 A records

Type | Host | IP

A record | help | 185.199.108.153

A record | help | 185.199.109.153

A record | help | 185.199.110.153

A record | help | 185.199.111.153

Go to https://github.com/adeemacdowell/helpdocs/settings/pages

Set the Custom domain with help.in-every-respect.com

Check upstream code base, a CNAME file is created

On local, pull the changes on gh-pages branch

Copy the CNAME file and switch to main branch

Add CNAME file to /docs

Make a slight change to index.html

$mkdocs build

$mkdocs gh-deploy

There should be a link to the online docs in the terminal results

Hit the link, notice the site loads with changes to index.html

https://docs.github.com/en/pages/configuring-a-custom-domain-for-your-github-pages-site