How to rsync files concerned by a specific commit message in a Gitlab Pipeline?

Hello everyone,

I am wondering if it’s possible to rsync files concerned by a specific commit message ? (or tag ? or other ?)

Actually i’m using rsync to deploy the whole PROJECT_DIR but i want to be more accurate by deploying only some specific files.

The problem is that if i have multiple commit all files concerned by them will be deployed by the rsync.

My actual Rsync command (gitlab-ci.yml) :
- rsync -avz --delete --chmod=Du=rwx,Dgo=rx,Fu=rw,Fog=r --exclude ‘.gitlab-ci.yml’ --exclude ‘.git*’ $CI_PROJECT_DIR/articles/ $PREPROD_CREDENTIALS:/var/www/pre.test.fr/current/articles

I’m not fluent in english so i try to do my best to explain my problem. Thanks for your help.