GitLab CI build sub-projects and deploy them to kubernetes separately

If I have a GitLab project, which contains several sub-folders:

two with java code (from java:alpine, to compile with maven and build containers)
one with nginx config (from openresty:alpine, to build a web server container)
Every of sub-projects has a Dockerfile, deployment.yml, and gitlab-ci.yml.

deployment.yml is similar for every of sub-folders in the project, as all the sub-projects results to a single multi-container kubernetes pod.

How can I set up this project to build and deploy to kubernetes only the container, which I edited by the last commit?

It seems like this FR would be helpful.