This is something pretty straight forward. There are two options for you to do that.
Use a Custom Domain to receive Emails with Mailgun Part 2
I got a response from Mailgun within a few hours saying now my domain is enabled. Looks like the domain is active now. Emails to info@pubudu.online
are now getting delivered.
Use a Custom Domain to receive Emails with Mailgun Part 1
The next thing you want after purchasing your new domain is to get an email address with that domain name.
I decided to use Mailgun for that since maintaing your own mail servers is a cumebrsome task. I am not going to create a new Mailgun account since I already have one. You might have to enter your Credit Card information when you register. But you will not be charged untill you send more than 10 000 emails a month.
Custom Domains for GitHub Pages
GitHub Documentation on Setting up Custom Domains will not that great if you do not know what you are supposed to do.
Here’s what you need to do to setup your own Subdomain.
Create a CNAME
file on your repo root. Then push your code to GitHub.