The mishna in Sanhedrin 11:4 says that the rebellious elder is not executed by his local court but is instead taken to Yerushalayim and executed on the next festival in front of all the people.
אֵין מְמִיתִין אוֹתוֹ לֹא בְבֵית דִּין שֶׁבְּעִירוֹ וְלֹא בְבֵית דִּין שֶׁבְּיַבְנֶה, אֶלָּא מַעֲלִין אוֹתוֹ לְבֵית דִּין הַגָּדוֹל שֶׁבִּירוּשָׁלַיִם, וּמְשַׁמְּרִין אוֹתוֹ עַד הָרֶגֶל וּמְמִיתִין אוֹתוֹ בָרֶגֶל, שֶׁנֶּאֱמַר (דברים יז) וְכָל הָעָם יִשְׁמְעוּ וְיִרָאוּ וְלֹא יְזִידוּן עוֹד,
This is according to R' Akiva; R' Yehudah says he is executed immediately and messengers are sent to all communities with the announcement.
My question is about R' Akiva's interpretation. Is he really saying that the execution occurred on the festival day, which would involve several forbidden melachot? For Pesach or Sukkot it could instead mean chol hamoed, the intermediate days, but that doesn't help for Shavuot. Or does the mishna just mean at the time of the festival, and they would execute him either before or after? What does בָרֶגֶל mean here?
I didn't find an answer in the g'mara here.