In Yang-Mills theories, it is possible to fix the gauge directly in the action, via a gauge fixing term of the form (for EM for instance)
$$S_{EM} = \int_D d^nx [-\frac{1}{4}F^{\mu\nu} F_{\mu\nu} - \frac{1}{2\xi} (\partial_\mu A^\mu)^2]$$
The Einstein field equations are also invariant under something similar to a gauge transformation, diffeomorphism invariance. This is usually achieved by imposing coordinate conditions such as the harmonic gauge.
Is there an equivalent process of gauge fixing for general relativity? Some term of the action that would generate, for instance, the harmonic condition
$$\partial_\mu(g^{\mu\nu} \sqrt{-g}) = 0$$
or any other such gauge