deploy function