Wikipedia is pretty accurate on this one:
The origins of this practice are not certain, and it is currently in decline (though still more common for ships, particularly in nautical usage, than for countries). In modern English, calling objects "she" is an optional figure of speech, and is advised against by most journalistic style guides such as the Chicago Manual of Style.
Using “she” for ships is still fairly common, and will not stand out as odd in most contexts; but it is becoming less common, and is discouraged by most authorities (both stylistic and maritime).
Using “she” for countries is now quite archaic. It can certainly still be used, but only if you want to very explicitly conjure up a personification of the country:
Ah, proud Britain! How she is fallen! Once her empire bestrode the globe; now, her power decimated, her economy hobbled, she wavers uncertainly between the behemoths of the US and Europe on either side, …
Except in a case like this where she is used for deliberate rhetorical effect, one would always expect it, its instead:
Britain faces tough years. It stands to receive a fresh influx of immigrants, even while its economy still struggles…
Googling confirms the overwhelming prevalence of its. Even for France, with a comparatively enduring female personification, google hits for "France faces its"
outnumber hits for "France faces her"
by a factor of about 6 (matching in each case phrases like “France faces her toughest challenge yet…”); and for other countries I tried (eg Britain) the disparity is much larger (a factor of about 100).