HELP Please! How to get modified files after MR

Hello guys!

I need help. I am creating a pipeline that deploys artefacts to a tool after a merge request is approved in GitLab.

I have been able a to get all the files thar are modified in all the commits that are related with the MR but, when it comes to push event after MR is approved and code is merged, I am not able to get the files that were involved on it to just deploy those files…

Example

In branch A (source) I have 4 commits.
commit 1: Files a.txt and b.txt were modified
commit 2: File c was modified
commit 3: File f was modified and a was removed.

At the end, after the MR is executed and push branch is created I should get the files b,c and f as result to be deployed.

I have tried many thing such as git diff and fgit log but it is not helping, I am able to get only the changes related with either last commit or all the commits from mine.

Thank you in advance for your help!