fix: script #9
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: Continue Deployment | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
deploy: | |
name: Build And Run | |
runs-on: ubuntu-latest | |
steps: | |
- name: executing remote ssh commands using ssh key | |
uses: appleboy/ssh-action@v1.0.3 | |
with: | |
host: ${{ secrets.HOST }} | |
username: ${{ secrets.USERNAME }} | |
key: ${{ secrets.PK_VM }} | |
port: ${{ secrets.SSH_PORT }} | |
script: | | |
pm2 list | |
rm -rf thread-api | |
git clone https://github.com/ramamimu/thread-api.git thread-api | |
cp /home/ahm_f_ramadhani/.env thread-api/.env | |
cd thread-api | |
npm install --omit=dev | |
pwd | |
ls | |
pm2 start ./src/app.js |