By using unbiased continuous-space quantum Monte Carlo simulations, we investigate the ground-state properties of a one-dimensional repulsive Fermi gas subjected to a commensurate periodic optical lattice (OL) of arbitrary intensity. The equation of state and the magnetic structure factor are determined as a function of the interaction strength and of the OL intensity. In the weak OL limit, Yang's theory for the energy of a homogeneous Fermi gas [C.-N. Yang, Phys. Rev. Lett. 19, 1312 (1967)PRLTAO0031-900710.1103/PhysRevLett.19.1312] is recovered. In the opposite limit (deep OL), we analyze the convergence to the Lieb-Wu theory for the Hubbard model [E. H. Lieb and F. Y. Wu, Phys. Rev. Lett. 20, 1445 (1968)PRLTAO0031-900710.1103/PhysRevLett....