What do you do if a girl that is a close friend does not want to date you but she flirts with you?

Either flirt back (mildly, in a joking way) or ignore her flirting altogether, but keep in mind she's not interested in dating you at all. Some people just enjoy flirting with friends/people they won't date as a safe way to get attention. There are other girls out there for you.