Upload firmware through pio ci command

I had followed the documentation for pio ci
but I can only compile an example of a library, the upload is ignored. This is the command that should work:

pio ci --project-conf platformio.ini --project-option="targets=upload" --project-option="upload_port=COM3" --lib src examples/esp_logger_rotate 

What am I missing?

If the example from the docs doesn’t work, which seems to be the case here as I also don’t see an error, please post a minimal example, the exact command and the command output as a bug report to Issues · platformio/platformio-core · GitHub.