Dynamics of entanglement in a one-dimensional Ising chain