Merge pull request #91 from CruSea/preparing-for-docker #15
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
name: Deploy Staging | |
on: | |
push: | |
branches: | |
- 'release-*' | |
jobs: | |
deploy: | |
name: Preparing Dev Server | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Connecting Server | |
uses: JimCronqvist/action-ssh@master | |
with: | |
hosts: '[email protected]' | |
privateKey: ${{ secrets.SSH_PRIVATE_KEY }} | |
debug: true | |
command: | | |
cd ~/soul-sync/staging/soul-sync-api | |
git stash | |
git clean -f -d | |
git pull | |
npm install | |
npm run build | |
npx prisma migrate reset --force | |
pm2 delete dev-soul-sync-api | |
pm2 start dist/src/main.js --name dev-soul-sync-api |