Hilchot Shabbat 5:17-18 (A rare case where we are lenient on Shabbat and strict on yom tov)
11:43 pm
How careful must you be when opening a door near a candle, in case you mistakenly cause the flame to go out? Can you attach a candle to a tree before Shabbat?