A mesoscopic model of a diblock copolymer is used to study the motion of a grain boundary separating two regions of perfectly ordered lamellar structures under an oscillatory but uniform shear flow. The case considered is a grain boundary separating lamellae along the so-called parallel orientation (with wavevector parallel to the velocity gradient direction) and along the transverse orientation (wavevector parallel to the shear direction). In the model considered, lamellae in the parallel orientation are marginal with respect to the shear, whereas transverse lamellae are uniformly compressed instead. A multiple scale expansion valid in the weak segregation regime and for low shear frequencies leads to a pair of envelope equations for the grain boundary. These equations show that the grain boundary moves by the action of the shear, with a net average velocity toward the transverse region. Three different dynamical effects are at play: a rigid deformation of the transverse region by the shear which increases its free energy, diffusive relaxation of the order parameter in the grain boundary region leading to relative phase motion between the two domains during a shear cycle, and wavenumber adjustment in the transverse region. We show that the average velocity of the boundary is an increasing function of shear frequency and that, except at very low frequencies, it can be expressed as the product of a mobility coefficient and a driving force given by the excess energy stored in the transverse phase being sheared.