In 2011, Portugal applied to an IMF bailout. What do you do when you beg someone for their money? You comply! You don't come out for the streets saying you won't pay! You say creditors exactly what they want to hear. You (seem to) reduce costs, you cancel holidays, you go even beyond what creditors ask you to do. You get smart, you understand you're in a weak position and take the best advantage of it. You don't do like the Greeks who let their egos be greater than their brains, and be on the spotlight for being over-spenders by saying they won't pay their creditors. That's what the government did in 2011-2015 and it worked! We got out of the spotlight and stop being perceived as over-spenders..
In 2015 a new government was elected. With the influx of tourists, and being seen as people who saved some money (and learned their lesson), the new government was in a really better position to try "the revival". They started reinvesting and giving the appearance that we are growing (and some things are, but also government spending). And it seems to be working so far...
So, what really seems to work? Both things. When you're in a weak position you comply, and then when you get to a stronger position, you negotiate. So both type of governments were needed at exactly their time.. A good timing - I think that was the key to the current success!