From f4f1c003a6e1304e3760d002a71402d2bb21eb5a Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Thu, 19 Jun 2025 11:13:08 +0200 Subject: [PATCH] gitlab-ci: 'pages' needs 'Build documentation' but it has `changes:` Fixes this error: > Unable to create pipeline > > 'pages' job needs 'Build documentation' job, but 'Build documentation' > does not exist in the pipeline. This might be because of the only, > except, or rules keywords. To need a job that sometimes does not exist > in the pipeline, use needs:optional. --- .gitlab-ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 416d5646..48956570 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -734,7 +734,9 @@ pages: artifacts: paths: - public - needs: ["Build documentation"] + needs: + - job: "Build documentation" + optional: true rules: - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH' # only publish pages on default (master) branch