As long as a pregnant woman is able to perform the major functions of her job, not hiring or firing her because she is pregnant is against the law. It's against the law to dock her pay or demote her to a lesser position because of pregnancy. It's also against the law to hold back benefits for pregnancy because a woman is not married. All are forms of pregnancy discrimination, and all are illegal.
Women are protected under the Pregnancy Discrimination Act. It says that businesses with at least 15 employees must treat women who are pregnant in the same manner as other job applicants or employees with similar abilities or limitations.