Static spherically symmetric star in Gauss—Bonnet gravity