It is a good idea to always have an updated résumé or CV available, one never knows when one may need to use it (for example if someone's job were made redundant this afternoon, by having their updated CV immediately available they can start job-hunting without delay).
By establishing a pattern of regularly updating one's CV over time, regardless of whether one is actively looking for a new job or not, it actually makes it harder to spot when someone is looking. I'll explain.
Take 2 people. Person A keeps their CV regularly updated, adding projects they've done or new positions they achieve as they go. Person B does not update their CV until one day they suddenly update their entire CV in one go. It becomes obvious that person B is looking for a job when they update theirs, whereas nobody can easily tell when person A starts to look.
Even when one is not looking, having one's CV up to date is helpful in their current job - it helps to give a good overview of where they are, what they've achieved, and can be a useful document during an appraisal.
Then there is the question of whether HR will even know it's your CV. Most online agencies are heavily anonymised (so as to avoid headhunters grabbing candidates without going through the agency!) so HR are unlikely to know (unless you are uniquely identifiable by your role).
If it is LinkedIn, then there is the argument that many people keep their profile updated on there, and it can even reflect well upon your employer as it shows achievements.
In short - it is a good idea to keep one's résumé or CV updated, and it is unlikely HR will spot it; even if they do, you can argue that it is beneficial because it helps to remind you of all you have achieved so that you can discuss it in their appraisal!