More than 50 people have been forced to evacuate after a 10-storey building partially collapsed – with one worker inside an excavator keeping the structure stable.