I will present a joint work with Abdellah Lahdili (Université du Québec à Montréal) and Eveline Legendre (Université Lyon 1), in which we propose a variational approach to the question of existence of constant scalar curvature Kähler metrics and K-stability that is based on some newly discovered properties of (a version of) the Einstein-Hilbert functional. In this talk I will present some of these properties, particularly in connection with test configurations and the Donaldson-Futaki invariant, and show how they can be used to give an alternative proof of the K-semistability of cscK manifolds.