Gears, pulleys, cams and linear guides.
Gears and motion
Tiny 12 × 10 mm geared DC motor with a ⌀3 D-shaft. Enter the gearbox length of your ratio.