Skip to content

Commit

Permalink
Update deploy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
VNxyz1 authored Nov 14, 2023
1 parent c9d425f commit 271694d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,16 @@ jobs:
known_hosts: ${{ github.ref == 'refs/heads/main' && secrets.PROD_KNOWN_HOSTS || secrets.DEV_KNOWN_HOSTS || '' }}

- name: ssh-scp-ssh-pipelines
env:
APP_NAME: ${{ github.ref == 'refs/heads/main' && 'GraphQL' || 'GraphQL Dev' }}
uses: cross-the-world/[email protected]
with:
host: ${{ github.ref == 'refs/heads/main' && secrets.PROD_SSH_HOST || secrets.DEV_SSH_HOST || '' }}
user: ${{ github.ref == 'refs/heads/main' && secrets.PROD_SSH_USER || secrets.DEV_SSH_USER || '' }}
key: ${{ github.ref == 'refs/heads/main' && secrets.PROD_SSH_KEY || secrets.DEV_SSH_KEY || '' }}
first_ssh: |
cd ${{ secrets.SSH_PATH }}
pm2 delete --silent "GraphQL Dev" || :
pm2 delete --silent $APP_NAME || :
rm -r * || :
scp: /home/runner/work/socinian-graph-dse/socinian-graph-dse/deploy.zip => ${{ secrets.SSH_PATH }}
last_ssh: |
Expand All @@ -107,7 +109,7 @@ jobs:
rm -r temp_folder
cd server
npm ci
pm2 start npm --name "GraphQL Dev" -- start
pm2 start npm --name $APP_NAME -- start
pm2 save

0 comments on commit 271694d

Please sign in to comment.