From 20667e52958b1060cf7caf86910eff77863c1d07 Mon Sep 17 00:00:00 2001
From: Christoph Reiter <reiter.christoph@gmail.com>
Date: Thu, 1 Jul 2021 11:29:28 +0200
Subject: [PATCH] Move the deployment code into .gitlab-ci

It's only relevant for CI
---
 .gitlab-ci.yml                      | 2 +-
 deploy.php => .gitlab-ci/deploy.php | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
 rename deploy.php => .gitlab-ci/deploy.php (97%)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index c4cbcbe..f2cb341 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -55,7 +55,7 @@ publish:
     - chmod 700 ~/.ssh && chmod 600 ~/.ssh/id_rsa
     - ssh-keyscan -t rsa "${DEPLOY_HOST}" >> ~/.ssh/known_hosts
     # Deploy
-    - 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/deploy.php b/.gitlab-ci/deploy.php
similarity index 97%
rename from deploy.php
rename to .gitlab-ci/deploy.php
index f45bcee..b92cdb2 100644
--- a/deploy.php
+++ b/.gitlab-ci/deploy.php
@@ -23,7 +23,7 @@ set('rsync',[
     'timeout'      => 60,
 ]);
 
-set('rsync_src', __DIR__ . '/dist');
+set('rsync_src', __DIR__ . '/../dist');
 set('rsync_dest','{{release_path}}');
 
 // Hosts
-- 
GitLab