Added manual deploy stage in case of server crash

This commit is contained in:
Firq 2023-04-22 18:31:59 +02:00
parent 492a0099cc
commit 1fc24d9abe
Signed by: Firq
GPG key ID: 4DE1059A4666E89F

View file

@ -3,6 +3,7 @@ stages:
- build
- deploy
- post_deploy
- scripts
.ssh_default: &ssh_default
- 'which rsync || ( apk update && apk add rsync )'
@ -106,3 +107,13 @@ maintenance-mode:
- 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/"
redeploy-site:
stage: scripts
when: manual
script:
- echo "Stopping screen session"
- ssh $DEPLOY_USER@$DEPLOY_HOST "screen -X -S website-firq-npx kill;"
- echo "Restarting screen session"
- ssh $DEPLOY_USER@$DEPLOY_HOST "screen -S website-firq-npx -dm npx serve public/ -p 9000 -c serve.json"
- echo "Website is up on https://firq.dev/"