Migrating to node-serve (@warren-bank/serve)

This commit is contained in:
Firq 2023-07-27 23:27:56 +02:00
parent 2c9c2854be
commit 9ec6d4a83b
Signed by: Firq
GPG key ID: 3ACC61C8CEC83C20

View file

@ -61,11 +61,11 @@ deploy-site:
- echo "Getting artifacts"
- ls public
- echo "Stopping screen session, cleaning"
- ssh $DEPLOY_USER@$DEPLOY_HOST "screen -X -S website-firq-npx kill; rm -r -f firq_dev/public/*;"
- ssh $DEPLOY_USER@$DEPLOY_HOST "screen -X -S firq_dev-public kill; rm -r -f firq_dev/public/*;"
- echo "Copying to proxmox machine"
- rsync -az --stats public/* $DEPLOY_USER@$DEPLOY_HOST:~/firq_dev/public
- echo "Restarting screen session"
- ssh $DEPLOY_USER@$DEPLOY_HOST "cd firq_dev; find maintenance public -maxdepth 1 -printf '%p\n'; screen -S website-firq-npx -dm ~/serve public/ -p 9000"
- ssh $DEPLOY_USER@$DEPLOY_HOST "cd firq_dev; find maintenance public -maxdepth 1 -printf '%p\n'; screen -S firq_dev-public -dm ~/serve public/ -p 9000"
- echo "Website is up on https://firq.dev/"
deploy-testing:
@ -80,11 +80,11 @@ deploy-testing:
- echo "Getting artifacts"
- ls public
- echo "Stopping screen session, cleaning"
- ssh $DEPLOY_USER@$DEPLOY_HOST "screen -X -S staging-firq-npx kill; rm -r -f firq_dev/staging/*;"
- ssh $DEPLOY_USER@$DEPLOY_HOST "screen -X -S firq_dev-staging kill; rm -r -f firq_dev/staging/*;"
- echo "Copying to proxmox machine"
- rsync -az --stats public/* $DEPLOY_USER@$DEPLOY_HOST:~/firq_dev/staging
- echo "Restarting screen session"
- ssh $DEPLOY_USER@$DEPLOY_HOST "cd firq_dev; find staging -maxdepth 1 -printf '%p\n'; screen -S staging-firq-npx -dm ~/serve staging/ -p 9100"
- ssh $DEPLOY_USER@$DEPLOY_HOST "cd firq_dev; find staging -maxdepth 1 -printf '%p\n'; screen -S firq_dev-staging -dm ~/serve staging/ -p 9100"
- echo "Staging environment is up!"
unlighthouse:
@ -119,11 +119,11 @@ unlighthouse-publish:
- echo "Getting artifacts"
- ls unlighthouse-reports
- echo "Stopping screen session, cleaning"
- ssh $DEPLOY_USER@$DEPLOY_HOST "screen -X -S unlighthouse-results kill; rm -r -f firq_dev/unlighthouse/*;"
- ssh $DEPLOY_USER@$DEPLOY_HOST "screen -X -S firq_dev-unlighthouse kill; rm -r -f firq_dev/unlighthouse/*;"
- echo "Copying to proxmox machine"
- rsync -az --stats unlighthouse-reports/* $DEPLOY_USER@$DEPLOY_HOST:~/firq_dev/unlighthouse
- echo "Restarting screen session"
- ssh $DEPLOY_USER@$DEPLOY_HOST "cd firq_dev; find unlighthouse -maxdepth 1 -printf '%p\n'; screen -S unlighthouse -dm ~/serve unlighthouse/ -p 9101"
- ssh $DEPLOY_USER@$DEPLOY_HOST "cd firq_dev; find unlighthouse -maxdepth 1 -printf '%p\n'; screen -S firq_dev-unlighthouse -dm ~/serve unlighthouse/ -p 9101"
- echo "Unlighthouse results are up!"
success_notification:
@ -163,9 +163,9 @@ maintenance-mode:
- main
script:
- echo "Stopping screen session"
- ssh $DEPLOY_USER@$DEPLOY_HOST "screen -X -S website-firq-npx kill;"
- ssh $DEPLOY_USER@$DEPLOY_HOST "screen -X -S firq_dev-public kill;" || true
- echo "Enabeling maintenance mode"
- ssh $DEPLOY_USER@$DEPLOY_HOST "screen -S website-firq-npx -dm ~/serve firq_dev/maintenance/ -p 9000"
- ssh $DEPLOY_USER@$DEPLOY_HOST "screen -S firq_dev-maintenance -dm ~/serve firq_dev/maintenance/ -p 9000"
- echo "Maintenance Website is up on https://firq.dev/"
redeploy-site:
@ -179,9 +179,9 @@ redeploy-site:
- *ssh_default
script:
- echo "Stopping screen session"
- ssh $DEPLOY_USER@$DEPLOY_HOST "screen -X -S website-firq-npx kill" || true
- ssh $DEPLOY_USER@$DEPLOY_HOST "screen -X -S firq_dev-public kill" || true
- echo "Restarting screen session"
- ssh $DEPLOY_USER@$DEPLOY_HOST "screen -S website-firq-npx -dm ~/serve firq_dev/public/ -p 9000"
- ssh $DEPLOY_USER@$DEPLOY_HOST "screen -S firq_dev-public -dm ~/serve firq_dev/public/ -p 9000"
- echo "Website is up on https://firq.dev/"
redeploy-staging:
@ -194,9 +194,9 @@ redeploy-staging:
- *ssh_default
script:
- echo "Stopping screen session"
- ssh $DEPLOY_USER@$DEPLOY_HOST "screen -X -S staging-firq-npx kill" || true
- ssh $DEPLOY_USER@$DEPLOY_HOST "screen -X -S firq_dev-staging kill" || true
- echo "Restarting screen session"
- ssh $DEPLOY_USER@$DEPLOY_HOST "screen -S staging-firq-npx -dm ~/serve firq_dev/staging/ -p 9100"
- ssh $DEPLOY_USER@$DEPLOY_HOST "screen -S firq_dev-staging -dm ~/serve firq_dev/staging/ -p 9100"
- echo "Staging environment is up!"
redeploy-unlighthouse:
@ -209,9 +209,9 @@ redeploy-unlighthouse:
- *ssh_default
script:
- echo "Stopping screen session"
- ssh $DEPLOY_USER@$DEPLOY_HOST "screen -X -S unlighthouse-results kill" || true
- ssh $DEPLOY_USER@$DEPLOY_HOST "screen -X -S firq_dev-unlighthouse kill" || true
- echo "Restarting screen session"
- ssh $DEPLOY_USER@$DEPLOY_HOST "screen -S unlighthouse-results -dm ~/serve firq_dev/unlighthouse/ -p 9101"
- ssh $DEPLOY_USER@$DEPLOY_HOST "screen -S firq_dev-unlighthouse -dm ~/serve firq_dev/unlighthouse/ -p 9101"
- echo "Staging environment is up!"
maintenance-deploy:
@ -224,7 +224,7 @@ maintenance-deploy:
- *ssh_default
script:
- echo "Stopping screen session"
- ssh $DEPLOY_USER@$DEPLOY_HOST "screen -X -S website-firq-npx kill;" || true
- ssh $DEPLOY_USER@$DEPLOY_HOST "screen -X -S firq_dev-public kill;" || true
- echo "Enabeling maintenance mode"
- ssh $DEPLOY_USER@$DEPLOY_HOST "screen -S website-firq-npx -dm ~/serve firq_dev/maintenance/ -p 9000"
- ssh $DEPLOY_USER@$DEPLOY_HOST "screen -S firq_dev-maintenance -dm ~/serve firq_dev/maintenance/ -p 9000"
- echo "Maintenance Website is up on https://firq.dev/"