In section V.2 of Prof. A. Zee's book Einstein Gravity in a Nutshell, it is given that to get the action of a point particle in a gravitational field from that of the action in SR, one just replaces $\eta_{\mu\nu}$ with $g_{\mu\nu}$. In other words,
$$ S = -m\int \sqrt{-\eta_{\mu\nu} dx^\mu dx^\nu} \Rightarrow -m\int \sqrt{-g_{\mu\nu}(x) dx^\mu dx^\nu} $$
This follows from the equivalence principle which states that one can mimic the effects of a uniform gravitational field by transforming to locally accelerated coordinate frames. But if only uniform gravitational fields can be mimicked in this manner, how does the action hold for the whole curved space-time? Shouldn't the above replacement be true only locally? How can we talk about global trajectories like geodesics when this only works locally? I think I am missing a fairly elementary point here.
Any help would be appreciated.