Deploying sub directories using github actions automatic way

I have a folder structure like my app(as github repo)-> multiple subfolders for multiple proxies(each have their own pom.xml). now i want github actions to pick automatically only the folder to which i am making changes and deploy to the same path in my application in the same branch that i push(dev/uat/qa/prd). all other paths are not be touched. how can i achieve this in realtime?