It’s not advisable due to safety reasons, especially with soft-top gazebos and wooden gazebos.
It is safe to use a firepit or grill under gazebos made from galvanized metal. However, caution should still be taken as excessive heat may damage the paint coat.