You can persuade cats, rather than train, and it's a long persistent game. As others have said, any deterrent needs to accompany the naughty act - absolutely no point afterwards. She'll just be puzzled why she can't come in if you make her stay outside. They have very limited or no ability to associate deterrents with past acts.
A loud noise like a shriek, rattled newspaper or clapping when the act is in progress is the only way, and even then, with something as delicious as the corner of my settee, she'll just wait till you aren't around to do it.