“… when Joseph became aware that Mary was with child, and was minded to put her away privily, the angel said to him in sleep: “Fear not to take to thee Mary thy wife; for that which is conceived in her is of the Holy Ghost. For she shall bring forth a son, and thou shalt call His name Jesus; for He shall save His people from their sins.” And exhorting him [to this], he added: “Now all this has been done, that it might be fulfilled which was spoken from the Lord by the prophet, saying, Behold, a virgin shall be with child, and shall bring forth a son, and His name shall be called Emmanuel;“
thus influencing him by the words of the prophet, and warding off blame from Mary, pointing out that it was she who was the virgin mentioned by Isaiah beforehand, who should give birth to Emmanuel. Wherefore, when Joseph was convinced beyond all doubt, he both did take Mary, and joyfully yielded obedience in regard to all the rest of the education of Christ, undertaking a journey into Egypt and back again, and then a removal to Nazareth.” (St. Irenaeus of Lyons, Against Heresies and Fragments, Kindle Loc. 6273-80)
We commemorate St Joseph the Betrothed on the Sunday after the Nativity.