$ echo "foobar.com" > CNAME
$ git commit && git push

Subdomain (like www):

 CNAME => username.github.io

Apex domains:

 ALIAS => username.github.io

Apex domains (alternative):

A => 192.30.252.153, 192.30.252.154