From ed078a1e78252efcb70f9b23908cb55c4acfd0f8 Mon Sep 17 00:00:00 2001
From: Christoph Reiter <reiter.christoph@gmail.com>
Date: Wed, 15 Sep 2021 11:21:19 +0200
Subject: [PATCH] Move the deploy config into .gitlab-ci

It's very CI specific
---
 .gitlab-ci.yml                              | 2 +-
 {toolkit-showcase => .gitlab-ci}/deploy.php | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
 rename {toolkit-showcase => .gitlab-ci}/deploy.php (95%)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index f785db96..d116bf13 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -52,7 +52,7 @@ publish:
     - ssh-keyscan -t rsa "${DEPLOY_HOST}" >> ~/.ssh/known_hosts
     # Deploy
     - cd toolkit-showcase
-    - dep deploy "${CI_ENVIRONMENT_NAME}"
+    - dep deploy --file ./../.gitlab-ci/deploy.php "${CI_ENVIRONMENT_NAME}"
     - echo "Deployed to ${CI_ENVIRONMENT_URL}"
     # Simple health check
     - curl --max-time 10 --retry 3 --output /dev/null --silent --show-error --fail --location "${CI_ENVIRONMENT_URL}"
diff --git a/toolkit-showcase/deploy.php b/.gitlab-ci/deploy.php
similarity index 95%
rename from toolkit-showcase/deploy.php
rename to .gitlab-ci/deploy.php
index 5f3098c5..2f134048 100644
--- a/toolkit-showcase/deploy.php
+++ b/.gitlab-ci/deploy.php
@@ -23,7 +23,7 @@ set('rsync',[
     'timeout'      => 60,
 ]);
 
-set('rsync_src', __DIR__ . '/dist');
+set('rsync_src', __DIR__ . '/../toolkit-showcase/dist');
 set('rsync_dest','{{release_path}}');
 
 // Hosts
-- 
GitLab