Masks must be worn in the embarkation terminal until you are on the ship. This is because there may be people in the embarkation terminal who are unknowingly positive.
Beyond that, mid-cruise embarkation/debarkation follows local rules. Back at the final terminal for final debarkation, it is strongly recommended. But if like me, you managed to pack your pile of mask/disembarkation documentation in your suitcase the night before, you'll find that they still let you off without issue.