There is also a tool ssh-import-id. It could do the similar with the command "ssh-import-id gh:<github username>".
It checks if key is already in authorized_keys, and it's handy if you want to run the command in idempotent manner.
It's available in Ubuntu packages, don't know about other distributions.