Interviewed to cover my bosses maternity leave but Im also pregnant (and havent told them)

As title says, I just interviewed to cover my bosses maternity leave. I am also pregnant, though haven’t told my work yet (14 weeks currently).

If I get the role, I would be able to cover roughly 3 months (out of a proposed 12 months) before my own leave would start. My existing contract is also up for renewal, ending weeks before my due date. This is another reason I am holding off telling them.

If I am miraculously offered this new role, at what stage should I tell them that I wouldn’t be able to cover the full term?

I don’t want to break trust but also need to ensure security for my own family :(

Author: TangeloNice9497