If the non-believer guy accepts converting to Islam and teaching the kids Islam while still keeping his own beliefs to himself at the same time not practising Islam himself, is it considered a valid marriage?

If you know any trusted source that I can ask please do mention it.