Skip to content

Commit

Permalink
wip: pm2 deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
chase-moskal committed Sep 15, 2024
1 parent 668bbd2 commit fed1400
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
with:
version: v2.2.2

- run: npm ci
- run: npm ci --production
- run: npm run build
- run: npm test

Expand All @@ -45,6 +45,7 @@ jobs:
- name: deploy the director
run: |
rsync -vhamz --delete --exclude ".git" --exclude "node_modules" -e "ssh -o StrictHostKeyChecking=no" ./ [email protected]:/home/deployer/app/
ssh -o StrictHostKeyChecking=no [email protected] "cd app && bin/serverside/redeploy"
- name: 🌎 download assets
env:
Expand Down
11 changes: 11 additions & 0 deletions bin/serverside/redeploy
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit fed1400

Please sign in to comment.