To publish a notebook, save it in the shared folder in your workspace. By doing so, your notebook shows up in the setting page of your workspace. From there, you can click on dropdown menu and select publish:
When you select publish, you are asked to choose with or without dependencies. If you choose with dependencies, all packages and assets inside your workspace will be included in your publication.