Well, outside or inside doesn't matter as far as heat is concerned, unless it's directly exposed to strong sunlight, but if it's 10c outside and you are supplying that air to the enclosed box and pushing it from the other end, the miner would run cool enough, as long as it's protected from rain and moisture, so it depends on your climate.
The miner type also makes a huge difference, some miners are fragile, while others can sustain harsh conditions.
Generally, I'd prefer building a small shed, just high enough for you to walk in, could be 2 square meters small just in case you decide to add more.
if you talking about a bunker, it would be a great idea, but if you talking about 0.5M deep hole you make with your shovel, no.