Hershey has signed a sponsorship deal with the National Hockey League (NHL) in North America.