As covered here, GitHub Pages is served with Nginx and automatically gzip's content.
You can confirm gzip compression for your site by checking the HTTP headers with online tools like this one. Enter the URL to a webpage or resource, and type in gzip
under "Accept-Encoding" to indicate that the HTTP client (i.e., the online testing tool in this case) accepts gzip compression, as most browsers do.
You might review the other information and suggestions here to optimize serving as well.