By using unbiased continuos-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, Yangs theory for the energy of a homogeneous Fermi gas is recovered. In the opposite limit (deep OL), we analyze the convergence to the Lieb-Wu theory for the Hubbard model, comparing two approaches to map the continuous-space to the discrete-lattice model: the first is based on (noninteracting) Wannier functions, the second effectively takes into account strong-interaction effects within a parabolic approximation of the OL wells. We find that strong antiferromagnetic correlations emerge in deep OLs, and also in very shallow OLs if the interaction strength approaches the Tonks-Girardeau limit. In deep OLs we find quantitative agreement with density matrix renormalization group calculations for the Hubbard model. The spatial decay of the antiferromagnetic correlations is consistent with quasi long-range order even in shallow OLs, in agreement with previous theories for the half-filled Hubbard model.