幸い (standalone adverb)
幸いなことに
Related pattern: 〜ことに
幸い (さいわい) and 幸いなことに (さいわいなことに) are adverbial expressions meaning "fortunately" or "luckily." They are used at the beginning of a sentence (or clause) to indicate that the outcome described was a fortunate or lucky one, often against expectations or in a situation where things could have gone worse.
幸いなことに is a more explicit and slightly more formal way to say the same thing. It follows the broader pattern of きごう〜ことに (Adj/Verb + ことに), which is used to express the speaker's emotional reaction to what follows. Other expressions using this pattern include おどろいたことに驚いたことに (surprisingly), ざんねん残念なことに (unfortunately), and うれしい嬉しいことに (happily).