  We present a highly stable bow-tie power enhancement cavity for critical
second-harmonic generation into the UV using a Brewster-cut
$\beta$-BaB$_2$O$_4$ (BBO) nonlinear crystal. The cavity geometry is suitable
for all UV wavelengths reachable with BBO and can be modified to accommodate
anti-reflection coated crystals, extending its applicability to the entire
wavelength range accessible with non-linear frequency conversion. The cavity is
length-stabilized using a fast general purpose digital PI controller based on
the open source STEMlab 125-14 (formerly Red Pitaya) system acting on a mirror
mounted on a fast piezo actuator. We observe $130\,\mathrm{h}$ uninterrupted
operation without decay in output power at $313\,\mathrm{nm}$. The robustness
of the system has been confirmed by exposing it to accelerations of up to
$1\,\mathrm{g}$ with less than $10\%$ in-lock output power variations.
Furthermore, the cavity can withstand 30~minutes of acceleration exposure at a
level of $3\,\mathrm{g}_\mathrm{rms}$ without substantial change in SHG output
power, demonstrating that the design is suitable for transportable setups.
