fuzzyworld

tower / commit

Merge branch 'main' into forest

286c85c66e84a3267da634b8c7605eeea8003535 · Pavel Safronov · 2026-09-27 17:23:08 -0700 · parents b4b8e46c823d 4903aa488d24

Merge branch 'main' into forest

Brings in the preview refresh through the trigger API (4903aa4).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
 .gitlab-ci.yml | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 011dab1..2bf7875 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -30,10 +30,16 @@ pages:
 # A push to any other branch rebuilds the site from the default branch, which is what
 # builds that branch's preview at /<branch>/. Parallel deployments would do this
 # natively, but they are Premium-only and this project is on the Free plan.
+#
+# Through the trigger API, with a pipeline trigger token in PAGES_TRIGGER_TOKEN (a masked
+# CI/CD variable): a `trigger:` job cannot start a pipeline in its own project, and
+# GitLab refuses it as invalid_bridge_trigger.
 preview:
   stage: deploy
-  trigger:
-    project: PavelSafronov/tower
-    branch: main
+  script:
+    - >
+      curl --fail --silent --show-error --output /dev/null
+      --form "token=$PAGES_TRIGGER_TOKEN" --form "ref=$CI_DEFAULT_BRANCH"
+      "$CI_API_V4_URL/projects/$CI_PROJECT_ID/trigger/pipeline"
   rules:
     - if: $CI_COMMIT_BRANCH && $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH