The conventional way is to bring the vessel alongside somewhere and hire a crane to pull the mast
out, then setting it on shore for the work to be done. When finished, reverse the process.
It can be done with the help of two other yachts, slightly larger is good. Then one rafts the three boats up with yours in the middle, and you use the halyards from the two outside boats to lift
and then lower your mast to the deck
. We did this some y ears ago in La Paz
. The subject boat was a ~32 foot trimaran
, the "crane boats" were our 36 ft mono and Motoissers (sp?) old Joshua, a 40 ft mono. Was pretty easy... and kinda fun, especially with a few Pacificos to lubricate the crew afterwards.
Good luck with it.