Create a new GitHub repository with gh-pages as default branch
Create a new GitHub repository for your
P3 project, or whatever site it is that you are creating.
Commit and sync your local website files to this new repository.
Once you have some files, navigate to the main repository page on GitHub. Where it says "Branch: master" click and create a new branch called "gh-pages".
In the settings for the repository, change the default branch from "master" to "gh-pages".
Link your domain to the repository
On your repository page on GitHub, go to the settings page. Scroll down to "GitHub Pages" and underneath you should see "Custom domain"
Fill in your custom domain name. No need for www. Just type "mydomain.com".
Add A records to your domain
Log into your DNS provider. (Mine is name.com -- this is wherever you bought your domain.)
Navigate to the area on the site where you can edit the domain's "DNS Record".
Add two "A Records" here. One has the answer of "220.127.116.11" and the other "18.104.22.168".