GitHub Pages provides static web hosting directly from a GitHub repository branch.
Custom Domains
CNAME File Setup
$ echo "foobar.com" > CNAME
$ git add CNAME
$ git commit -m "Add custom domain" && git push
Create a CNAME file in the root or publish directory (docs/ or gh-pages branch) containing your custom domain.
See: Configuring a custom domain for your GitHub Pages site (github.com)
DNS Record Configuration
Subdomain (e.g. www.example.com or blog.example.com):
CNAME => username.github.io
Apex / Root domain (example.com via ALIAS / ANAME):
ALIAS => username.github.io
Apex / Root domain (via A records):
A => 185.199.108.153
A => 185.199.109.153
A => 185.199.110.153
A => 185.199.111.153