The Shulchan Aruch · Orach Chayim
אורח חיים תקכ״דOrach Chayim 524
Siman 524 of 697 in Orach Chayim — 2 se'ifim
הלכות יום טובLaws of the Festivals· siman 524
Se’if 1א׳
אֵין עוֹלִין עַל גַּב אִילָן, וְלֹא רוֹכְבִין עַל גַּב בְּהֵמָה, וְלֹא שָׁטִין עַל פְּנֵי הַמַּיִם, וְלֹא מְסַפְּקִין לְהַכּוֹת כַּף עַל יָרֵךְ, וְלֹא מְטַפְּחִין לְהַכּוֹת כַּף עַל כַּף, וְלֹא מְרַקְּדִין, וְלֹא דָּנִין, וְלֹא מְקַדְּשִׁין, וְלֹא כּוֹנְסִים, וְלֹא מְיַבְּמִים, וְלֹא מְגָרְשִׁין, וְלֹא חוֹלְצִין, וְלֹא מַקְדִּישִׁין, וְלֹא מַחֲרִימִין, וְלֹא מַפְרִישִׁין תְּרוּמָה וּמַעַשְׂרוֹת. הַגָּה: וְדִין פִּדְיוֹן הַבֵּן, כְּדִינוֹ בְּשַׁבָּת כָּךְ דִּינוֹ בְּיוֹם טוֹב, וְעַיֵּן לְעֵיל סי' של"ט (סָעִיף ד').
1. Some things that are forbidden on a holiday, 2 Seifim: We do not climb a tree, ride on an animal, swim in water, slap the hand on the thigh, clap hands, dance, make legal judgments, get engaged, get married, divorce, perform a Levirate marriage, do halitzah, make a cherem vow, or separate trumah or tithes. Rem"a: Regarding redeeming the first born, the rule on a holiday is the same as the rule on Shabbat. See above in chapter 339 paragraph 4.
Se’if 2ב׳
שְׁכִיב מֵרַע דְּתַקִּיף לֵיהּ עָלְמָא טוּבָא, שָׁרֵי לְגָרֵשׁ אֲפִלּוּ בְּשַׁבָּת.
2. One who is dangerously ill and will leave the world soon is permitted to divorce, even on Shabbat.
Shulchan Aruch, Orach Chayim — Torat Emet 363 edition, via Sefaria — public domain
English: Sefaria Community Translation — CC0