We demonstrate that zero-field $beta$-detected nuclear quadrupole resonance and spin relaxation of low energy $^8$Li can be used as a sensitive local probe of structural phase transitions near a surface. We find that the transition near the surface of a SrTiO$_3$ single crystal occurs at $T_c sim 150$ K, i.e., 45 K higher than $T^{bulk}_c$, and that the tetragonal domains formed below $T_c$ are randomly oriented.