From 3f83369a77468300cc8f69b1b2192b69a4f3a366 Mon Sep 17 00:00:00 2001 From: Firq Date: Sat, 8 Jul 2023 17:34:14 +0200 Subject: [PATCH] maintenance stage on tags and manual maintenance --- .gitlab-ci.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b4b159d..7b26e06 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -119,6 +119,7 @@ maintenance-mode: before_script: - *ssh_default only: + - tags - main script: - echo "Stopping screen session" @@ -157,3 +158,18 @@ redeploy-staging: - echo "Restarting screen session" - ssh $DEPLOY_USER@$DEPLOY_HOST "screen -S staging-firq-npx -dm npx serve staging/ -p 9100 -c serve.json" - echo "Staging environment is up!" + +maintenance-deploy: + stage: scripts + when: manual + only: + - main + - tags + before_script: + - *ssh_default + script: + - echo "Stopping screen session" + - ssh $DEPLOY_USER@$DEPLOY_HOST "screen -X -S website-firq-npx kill;" || true + - echo "Enabeling maintenance mode" + - ssh $DEPLOY_USER@$DEPLOY_HOST "screen -S website-firq-npx -dm npx serve maintenance/ -p 9000 -c serve.json" + - echo "Maintenance Website is up on https://firq.dev/"