According to what I have studied, the change in Gibb's free energy is only a condition for spontaneity for processes happening at constant pressure and temperature conditions.
Consider a reversible reaction happening in a closed vessel at a constant temperature. We check the feasibility of the reaction at any instant using the following equation:
$\Delta G = \Delta G^{.} + RT\ln(Q) $
As the reaction happens, the partial pressures of each gaseous component will keep on changing as well as the total pressure. Then how can we use Gibb's free energy for checking spontaneity?