The difference between them is that pod lib lint does not access the network, whereas pod spec lint checks the external repo and associated tag.
If you're deploying an Open Source library to trunk, you cannot have CocoaPods warnings. You can have Xcode warnings though. You should continue to the getting started with trunk guide to deploy to the public.
If you're deploying to a private Specs repo, you will need to have already added that repo. See the guides on Private Specs Repos to set that up. If you are deploying to an existing Private Repo, use this command to deploy:
pod repo push SPEC_REPO *.podspec --verbose
Development Pods
[!] Note: Due to a Development Pods implementation detail, when you add new/existing files to Pod/Classes or Pod/Assets or update your podspec, you should run pod install or pod update.