An action principle for the Vlasov equation and associated Lie perturbation equations. Part 2. The Vlasov–Maxwell system