From 459d5a6ac40ecbaa7b67e955b169bf131015aa24 Mon Sep 17 00:00:00 2001 From: Oliver Smith Date: Sun, 6 Jul 2025 20:27:31 +0200 Subject: [PATCH] CI: fix running deploy job on master * Run the docs job on master too if relevant files changed. * Run the deploy job only with the same condition. Fixes: 4dd82075 ("CI: Only run most pipelines when they actually are necessary") Part-of: https://gitlab.postmarketos.org/postmarketOS/pmbootstrap/-/merge_requests/2639 --- .gitlab-ci.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a2cf8885..b9d5dc69 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -144,6 +144,11 @@ docs: - .ci/docs.sh - .gitlab-ci.yml - "pmb/**/*.py" + - if: $CI_COMMIT_BRANCH == 'master' + changes: + - .ci/docs.sh + - .gitlab-ci.yml + - "pmb/**/*.py" script: - ".ci/docs.sh" artifacts: @@ -151,8 +156,12 @@ docs: - public deploy: - only: - - master + rules: + - if: $CI_COMMIT_BRANCH == 'master' + changes: + - .ci/docs.sh + - .gitlab-ci.yml + - "pmb/**/*.py" stage: deploy before_script: - apk -q add openssh-client rsync