Need assistance with configuring DNS properly

Currently do I have a www subdomain with a corresponding CNAME file set up, but I would now like to use an apex domain instead.
The only thing is, that the guide is, at least for me, a bit vague in certain areas and I’m not sure if I would do things right.

I use Cloudflare DNS and currently have the domain setup like this:

  • CNAME record for www pointing to andre601.github.io
  • A record with a dummy IP 192.0.2.1 from Cloudflare to make a Redirect Page rule work.

If I understand things right will I now need to make the following?

  • A records for root (@) pointing to the IPs 185.199.108.153, 185.199.109.153, 185.199.110.153 and 185.199.111.153
  • CNAME record still pointing to the same domain (Or towards root now?)

I hope someone can give me some quick info on how I can get things to work the way I would like them to…

Setup seems to work.

Have a CNAME pointing to my github.io user page and A records pointing to the different IP addresses.
Redirect seems to work fine