Acceleration of polarized protons and deuterons in the ion collider ring of JLEIC