If it's not possible (or not practical), what are best practices for deployment security?
I think that deployment via another program (such as Realms) is probably not practical for most folks.
The Solana CLI help information lists using a hardware wallet keypair file by setting the keypair file path as usb://ledger
Specifically from the solana program deploy --help
output:
--program-id <PROGRAM_ID>
Executable program's address, must be a keypair for initial deploys, can be a pubkey for upgrades [default:
address of keypair at /path/to/program-keypair.json if present, otherwise a random address], one of:
* a base58-encoded public key
* a path to a keypair file
* a hyphen; signals a JSON-encoded keypair on stdin
* the 'ASK' keyword; to recover a keypair via its seed phrase
* a hardware wallet keypair URL (i.e. usb://ledger)
So I would think you can set any keypair file to be the usb://ledger
key file should work
Using a Ledger pubkey to reserve a program address (program id), while possible, doesn't particularly make sense. This keypair is only used once, during the initial deployment, then never needs to sign again. There is no reason for it to be secure.
There are other roles regarding program deployment/management as well: