Deploy script optimization