A primary school has raised thousands towards its £20,000 fundraising goal with a festive cycling challenge.