The analog of the Chern-Gauss-Bonnet theorem is studied for a $C^*$-dynamical system consisting of a $C^*$-algebra $A$ equipped with an ergodic action of a compact Lie group $G$. The structure of the Lie algebra $\mathfrak{g}$ of $G$ is used to interpret the Chevalley-Eilenberg complex with coefficients in the smooth subalgebra $\mathcal{A} \subset A$ as noncommutative differential forms on the dynamical system. We conformally perturb the standard metric, which is associated with the unique $G$-invariant state on $A$, by means of a Weyl conformal factor given by a positive invertible element of the algebra, and consider the Hermitian structure that it induces on the complex. A Hodge decomposition theorem is proved, which allows us to relate the Euler characteristic of the complex to the index properties of a Hodge-de Rham operator for the perturbed metric. This operator, which is shown to be selfadjoint, is a key ingredient in our construction of a spectral triple on $\mathcal{A}$ and a twisted spectral triple on its opposite algebra. The conformal invariance of the Euler characteristic is interpreted as an indication of the Chern-Gauss-Bonnet theorem in this setting. The spectral triples encoding the conformally perturbed metrics are shown to enjoy the same spectral summability properties as the unperturbed case.