So is there already a solution for https on Github Pages with a custom domain?
You first have to upload your SSL certificate to AWS IAM [2] (you only have to do this once, or you can just purchase your certificate from the AWS console now too). Then, all you have to do is create a new CloudFront distribution and point the origin to your subdomain.github.io URL and select your SSL certificate from the drop-down, then point your CNAME record to the CloudFront distribution.
[2] https://bryce.fisher-fleig.org/blog/setting-up-ssl-on-aws-cl...