trigger website builds when translations change
i have made the mirror of the translation repository between gitolite and gitweb (tpo/tpa/team#40497 (closed)) which was necessary to have translated websites build correctly when translations get updated.
but that's not enough: we also need some GitLab CI logic here to trigger the right build when the right branch gets pushed. i don't quite know how to do this, because i'm not sure what the logic is.
@emmapeel could you clarify the spec here? is that some workflow thing like what we used to have in the gitlab-ci.yml? something like this:
workflow:
rules:
- if: $CI_PROJECT_NAME == "support"
variables:
TRANSLATION_BRANCH: "support-portal"
- if: $CI_PROJECT_NAME == "manual"
variables:
TRANSLATION_BRANCH: "tbmanual-contentspot"
- if: $CI_PROJECT_NAME == "community"
variables:
TRANSLATION_BRANCH: "communitytpo-contentspot"
- if: $CI_PROJECT_NAME == "tpo"
variables:
TRANSLATION_BRANCH: "tpo-web"
... but in reverse, that is a logic like: "if we are on branch support-portal, trigger the support build"? not sure how that would actually work in the yaml file... maybe with a variable?
something like this maybe?
workflow:
rules:
- if: $CI_COMMIT_REF_NAME == "support-portal"
variables:
TRIGGER_PROJECT: "tpo/web/support"
deploy:
stage: deploy
trigger: $TRIGGER_PROJECT