This paper presents a new method to design global path-following controllers for underactuated ships under both deterministic and stochastic sea loads. The path-following errors are first interpreted in a moving frame attached to the path. These errors are then to be stabilized at the origin by a design of controllers based on backstepping and Lyapunov's direct methods. Weak and strong nonlinear Lyapunov functions are introduced to overcome difficulties caused by underactuation and Hessian terms induced by stochastic differentiation rule, and to guarantee boundedness of the sway velocity. Potential projection functions are introduced to design update laws that provide bounded estimates of the mean values and covariances of the disturbances. Simulations are included to illustrate the effectiveness of the proposed approach.