This is because they have to check your A records and generate the certificate and from my observations that happens when you add the custom domain.
After I've set the A records, I removed the custom domain from GitHub's Settings and then re-added it.
It started working afterwards.