Artificial gauge field for photons in coupled cavity arrays