Title VII of the Civil Rights Act of 1964 prohibits discrimination against an employee with respect to terms, conditions, or privileges of employment on the basis of, among other characteristics, the employee's sex. In addition the federal Pregnancy Discrimination Act of 1978 prohibits workplace discrimination against pregnant women. However, it wasn't until the Supreme Court ruling in 2015 that the act provided additional clarification on an employer's duty to provide the same type of accommodations to pregnant employees as it does similarly disabled workers.
In this recent case, see the article here, the Equal Employment Opportunity Commission (EEOC) filed a lawsuit against Walmart Inc. alleging the company has unlawfully discriminated against pregnant workers for years at one of their warehouse locations in Wisconsin. The lawsuit states Walmart Inc. did not provide pregnant workers with the same job modifications that were provided to non-pregnant employees with physical disabilities as clarified by the aforementioned 2015 Supreme Court ruling.