I'm pregnant with my Ex's baby

I'm 17 and my ex boyfriend and I broke up 1 month again and it's been really hard for me I still love him and he's a great guy. The other day I was feeling really sick and i had missed my period and I tested and it came back with a faint line so I went to the doctors got tested there and I'm pregnant. I don't know what to do we had sex once and it was both our first times, we didn't end badly but I don't know how to tell him this or my family or his family. I don't want him to feel like he has to stay with me because of a baby that I'm not sure if I will keep or not... help please

*edit*

We also used protection, he had a condom and I was on the pill. (First month of being on it)