maintenance stage on tags and manual maintenance

This commit is contained in:
Firq 2023-07-08 17:34:14 +02:00
parent fcce0af5b2
commit 3f83369a77
Signed by: Firq
GPG key ID: 3ACC61C8CEC83C20

View file

@ -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/"