If the residence of a defendant in an action for divorce, annulment, or legal separation is unknown, or if the defendant is not a resident of this state or is a resident of this state but absent from the state, notice of the pendency of the action shall be given by publication as provided by the Rules of Civil Procedure.