Staging restart script

This commit is contained in:
Firq 2023-07-08 15:44:10 +02:00
parent 4aa3865148
commit cb578be2e2
Signed by: Firq
GPG key ID: 3ACC61C8CEC83C20

View file

@ -142,3 +142,18 @@ redeploy-site:
- echo "Restarting screen session" - echo "Restarting screen session"
- ssh $DEPLOY_USER@$DEPLOY_HOST "screen -S website-firq-npx -dm npx serve public/ -p 9000 -c serve.json" - 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/" - echo "Website is up on https://firq.dev/"
redeploy-staging:
stage: scripts
when: manual
except:
- main
- tags
before_script:
- *ssh_default
script:
- echo "Stopping screen session"
- ssh $DEPLOY_USER@$DEPLOY_HOST "screen -X -S staging-firq-npx kill" || true
- 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!"