Handy: It turns out that if you configure GitHub Pages for an APEX domain, they will also gratefully handle www if you set it up as a CNAME for the APEX.
Example: GitHub Pages setup for
example.io (A points to 220.127.116.11), and
www.example.io is a CNAME for example.io. Then GitHub Pages will do a 301 redirect from www to the naked domain.