I’ve heard it done at Mass only twice. Both times it was the First Mass of Thanksgiving of a newly ordained priest, done in the Extraordinary Form. It is a custom to begin the Mass with the newly ordained kneeling before the sanctuary, before beginning the Asperges and the prayers at the foot of the altar, and intoning the Veni Creator Spiritus. This is for him to ask the Holy Spirit for aid as he celebrates Mass for the first time. And at the end, the Te Deum is sung as the procession forms up, in thanksgiving for the ordination and first Mass.
Other than that, the only time I’ve heard it done publicly as part of the liturgy was at the Vatican on New Year’s Eve at Vespers. If you look in the ordo, there’s actually a note that the Te Deum may be sung on New Year’s Eve at the conclusion of Vespers anywhere. Usually, though, the place it pops up in the liturgical life of the Church is during the Liturgy of the Hours, so the Office of Readings in the modern form. I am unfamiliar with the structure of the older form of the Office and so cannot comment on when it appears there.
-Fr ACEGC