-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
4 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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: | | ||
|
@@ -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 | ||
|