In the world I'm from, the place I worked had a safety mechanism, I guess you would call it. If a threat to the building was detected, a protective barrier would automatically be initiated, sealing the building. Nothing could get in or out, allowing those within to take care of the threat if the threat was inside. It also would keep an external threat outside.
Obviously it was not used against a god in my world, but it is still an idea. In the experience I had with it, it contained a nuclear explosion completely. I could build a prototype to demonstrate, but it would take time. And I'd rather have confirmation or denial before I even tried to work on it.