Take E \triangleq \{ n \in \mathbb {N} \mid n\ \text {is even}\}. Let Y \subseteq \mathcal {P}(\mathbb {N}) be directed and E \subseteq \bigcup Y. Since 2 \in E there must exist y \in Y such that 2 \in Y. Since (y,0,+) is a monoid, every positive multiple of 2 is also in y, thus E \subseteq y and therefore E is compact.
Seeing as compact elements are also sometimes called finite, this is surprising as E is an infinite set. The reason it is nonetheless compact is that E is finitely generated — it is the smallest submonoid of (\mathbb {N},0,+) such that the finite set \{ 2 \} \subseteq E. In fact, the compact submonoids of (\mathbb {N},0,+) are precisely the finitely generated ones.