diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 5b9a430..4f0a2d0 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -30,7 +30,7 @@ jobs: with: version: v2.2.2 - - run: npm ci + - run: npm ci --production - run: npm run build - run: npm test @@ -45,6 +45,7 @@ jobs: - name: deploy the director run: | rsync -vhamz --delete --exclude ".git" --exclude "node_modules" -e "ssh -o StrictHostKeyChecking=no" ./ deployer@director.regis.gg:/home/deployer/app/ + ssh -o StrictHostKeyChecking=no deployer@director.regis.gg "cd app && bin/serverside/redeploy" - name: 🌎 download assets env: diff --git a/bin/serverside/redeploy b/bin/serverside/redeploy new file mode 100755 index 0000000..3920094 --- /dev/null +++ b/bin/serverside/redeploy @@ -0,0 +1,11 @@ +#!/bin/bash + +# +# this script is meant to be run on the director's production server. +# do not run this locally in your dev environment.. +# + +npm ci --production + +pm2 restart director || pm2 start "npm run director --silent" --name director +