Her friend has struggled with infertility. How do they announce their pregnancy?

Her friend has struggled with infertility. How do they announce their pregnancy?

“One of my best friends and I have had discussions about her struggle with infertility. My husband and I have been married for half a year and I just found out I’m pregnant! I’m concerned about being insensitive with our celebration.
Is it okay to invite her to our gender reveal?
Do we give her a heads up before we tell everyone?”