Refactor publish rake task to exclude examples directory