I can't figure out how to repair a ship. In the old version (years ago), you must go to port and wait. This version has a repair button, half the time it's disabled, the other times it doesn't work. I'm playing advanced with some modifications.
Viewing post in Welcome To Empire Deluxe Combined Edition
The rest and repair button should be active when it is in a city. The unit needs rest after combat and can do this anywhere (not move) If the unit takes hits, it can only repair at the city (or port in the ship case).
One hit point per turn when not moving in city
One point less of fatigue when not moving. It will repair before rest.