Anser by Rabbi Chaim Hillel Raskin – Rov in Kfar Chabad Beis, Israel:
The Torah permits food-related melachos on yom tov, yet specifies, “that alone may be done for you,” from which Chazal derive that the allowance to cook on yom tov is only when done for a Jew.
As a safeguard, Chazal prohibited inviting a gentile to a yom tov meal, for the Jew might come to put up an extra pot for the gentile on yom tov.
If a gentile comes uninvited, one may serve him food, as long as one doesn’t press him to eat, because the concern of cooking a new pot applies only to a guest that he wants to honor.
If a Jew is intermarried, one may invite the Jew even if one knows that they will bring their non-Jewish family. If not inviting the gentile will disrupt someone’s simchas yom tov, some poskim permit the invitation if one ensures not to cook for him on yom tov.
In cases of necessity, one may serve ready food to the gentile even if it will necessitate cooking more food for future yom tov meals.
However, adding food for the gentile to a pot, even before placing it on the fire, is prohibited, since this might lead to putting up an entirely additional pot for him.
For a non-Jewish aid or household helper, whom one is responsible to feed (and one is not looking to honor), one may add food to the pot before placing it on the fire, but one may not do so after the pot is on the fire.
One may invite a gentile to a Shabbos meal, even when it coincides with yom tov, for the concern of cooking is not applicable.
Published by Merkaz Anash in the Weekly Farbrengen email. See Sources