Moed Katan 2a: We may fix roads and town squares and mikvaos, we may take care of all public needs, and we may mark graves.
Shulchan Aruch Orach Chaim 544:1: Public needs may be taken care of on Chol Hamoed, for example, fixing the roads and removing potential dangers from them, marking graves so that the kohanim stay away, and fixing mikvaos. Rema: This heter is only for things like the above that are needs of the body, but other public needs, such as a shul, are forbidden to build on Chol Hamoed. And the same goes for any mitzvah needs – it is forbidden to do professional work for them.
Mishnah Berurah: This means even a shul that is needed to daven in with a minyan on Chol Hamoed, and even if they have no other place to hold the minyan, it is still forbidden, since this is not a bodily need. And even if they already began construction, and it just needs to be finished on Chol Hamoed, it is forbidden, since this is a professional job. However, the poskim (the Beis Yosef in Bedek Habayis) say that nowadays, building a shul is a davar ha’aved, because we fear that if we wait until after the Moed, the non-Jewish workers will refuse to continue building. The Maamar Mordechai says that the answer to this shailah varies depending on the time and place, and every rav must pasken as he sees fit.
מועד קטן ב ע”ב: ומתקנין את הדרכים ואת הרחובות ואת מקוות המים, ועושין כל צורכי הרבים, ומציינין את הקברות.
שולחן ערוך אורח חיים תקמד,א: צרכי רבים מותר לעשותה בחול המועד כגון לתקן הדרכים ולהסיר מהם המכשולות ולציין הקברות כדי שיזהרו מהם הכהנים ולתקן המקואות: הגה ודוקא צרכי רבים כאלו שהם צריכים לגוף האדם אבל שאר צרכי רבים כגון בנין בית הכנסת (ב״י בשם תשובת הרשב״א) אסור לעשות במועד וה״ה דלשאר צרכי מצוה אסור לעשות מלאכת אומן במועד (ריב״ש סימן רנ״ו)
משנה ברורה: כגון בנין ביהכ״נ. לרבותא נקט דאפילו בנין ביהכ״נ שהוא מצוה כדי להתפלל בו במועד בעשרה ואפילו אין להם מקום אחר להתפלל בעשרה ג״כ אסור שזה אין צורך לגוף האדם ואפילו התחילו מכבר לבנותו וא״צ במועד אלא להשלימו אסור מפני שהוא צריך מעשה אומן לזה. כתבו הפוסקים דבזה״ז הוי בנין ביהכ״נ דבר האבד דחיישינן שאם ימתין עד אחר המועד יעכבו העכו״מ מלבנותו. ובספר מאמר מרדכי כתב דהכל לפי המקום והזמן ואין לדיין אלא מה שעיניו רואות ע״ש.
When Rabbi Moshe Heinemann and his kehillah built the Agudah building on Park Heights in Baltimore, they chose the cheapest contractor, who was $60,000 cheaper than his competitors. But in the middle of the construction he went bankrupt. It was Chol Hamoed, and the workers were not willing to sit and wait. Now it was a question of davar ha’aved – if the Agudah didn’t pay the workers to keep working, they would leave and find other employers to work for. The Agudah would then have to find a new contractor, which would cost them a lot more, since the contractor would know they were stuck. Therefore, based on the Mishnah Berurah, Rabbi Heinemann permitted the shul to pay the workers and continue the construction on Chol Hamoed.
Source: Kuntres Mah Nomar, Hilchos Chol Hamoed, p. 7
[Why is a mikvah considered a physical need while a shul is considered a mitzvah need? One answer could be that in those days people didn’t have private bathrooms, and they had to bathe in the public bathhouse. A mikvah is simply a bathhouse that is made according to the halachos of mikvaos. Since they would need it anyway to get clean, it is considered a physical need. According to this, nowadays it would be forbidden to build a mikvah on Chol Hamoed.
Alternatively, we could say that a mikvah is really for physical needs – to permit husbands and wives. The same reasoning would explain why it is allowed to mark graves: because otherwise kohanim would have difficulty getting around, so this is considered a physical need.]
