Thermal evolution of a pulsating neutron star