Skirmishing
Attacking the giant head-on is foolish. However, warfare has known skirmishing and hit and run tactics since at least the Romans who employed velites - light infantry who would be mobile and engage enemies from afar with javelins.
These light attackers do not need to do much. They only need harass the giant to distract her and either keep her occupied or...
Traps (option 1)
...lead her to a trap. A pit trap or a bog, or even dense enough vegetation can be used to lose the giant's footing when the army can swoop down.
This is not dissimilar to how heavy cavalry was handled in some cases. A fully armoured knight might as well be unstoppable as a modern tank when compared to some tribal opponents. Yet the significant bulk of the armour has been used against such knights by drawing them to swamps (where they lose their mobility) and using hooks on poles to drop them from their horse. At that point the tank turns into just a turtle on its back. The armour weighing them down while less armoured and worse armed people dealt with the helpless tin can.
A giant, once downed, would likely be significantly exposed to actual army attacks. As well as long ranged attacks like bows or siege weapons. The trap area can also be rigged with explosives, or other dangers like ignitable materials that can be set alight once the trap is spring.
Even without extra contraptions, or army around - a pit trap can be laid with spikes. Or it could just be that - a pit and a giant falling in it might break a leg which neutralises the threat. Just make sure the pit is deep enough.
Do nothing (option 2)
...they just keep harassing her, run circles and never engage. This is another Roman invention called Fabian strategy.
Short history lesson: the Carthagen general Hannibal Barca was one of the most dangerous opponents Rome has ever faced. He was a masterful tactician and strategist and decisively won every battle against Roman legions. This culminated with the battle of Cannae the worst military defeat Rome has ever suffered in its history. Almost the entire Roman military force of the time was lost. Estimates place it between 50 and 70 thousand troops. Further estimates place this to somewhere between 5% and 20% of the male population of Rome at the time. This was no mere defeat - the Romans had to refresh their troops from the elderly and the completely inexperienced youth.
It is hard to undersell how horrific this defeat was. In one fell swoop Hannibal not only won the battle but almost destroyed all the military Rome had. The replacements would be fewer in number and a lot less experienced.
Quintus Fabius Maximus Verrucosus realised Rome cannot win against this opponent, who as might have been a giant crushing rocks. The solution was to avoid fights and just wear down the enemy through attrition. It worked. Despite winning the battle, Carthagen lost the war as his army roamed the lands but did no major battles and little by little lost men until Hannibal had no choice but return home.
Similarly, a giant can be engaged, harassed, goaded, but never engaged. Even if spears do not pierce her skin and arrows do nothing, she will also do nothing if persistently avoided. The armies have one big advantage here - numbers. Send a wave of skirmishers, then replace them with fresher troops. This is a constant barrage of soldiers who only serve to wear down the giant. She has a limit - eventually she would tire. They could persist the skirmishing and never let her sleep or feed. They do not have to kill her - just to drive her away.
A living giant not here is still a win. She can go crush rocks in the neighbouring kingdom.