Let me just do a quick summary for future people visiting this thread with the same confusion:
So the basic statement is that the (free) Yang-Mills action has conformal symmetry in Minkowski space. One way to check this statement is via the vanishing of the trace of the energy-momentum tensor. To see how this is crucial: remember T_{\mu \nu} = \frac{\partial S}{\partial g^{\mu \nu}} hence the *trace* of this should express how the action changes under a scaling of the metric, which is what conformal symmetry is all about.
For Yang-Mills one can check that T^\mu_\mu = \left( \frac{g^\mu_\mu}{2} - 1 \right) F^{\mu \nu} F_{\mu \nu} (source: the Deligne book that andrien refers to, p200, equation (3.79)). Hence this vanishes if and only if our spacetime is 4D, in which case the trace of the metric is -1+1+1+1 = 2.
When we do QFT we look at the path-integral \int e^{iS} \mathcal D A and it turns out our measure is not conformally invariant, hence our theory/amplitudes will not be (this is called an anomaly). However, anomaly only enter in loop calculations(?), hence we should still expect Yang-Mills to have conformally invariant tree scattering amplitudes, an example being the so-called MHV amplitudes.