Update connect database server #233
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 to VPS oracle | |
on: | |
push: | |
branches: | |
- 'main' | |
paths-ignore: | |
- 'sql_package/**' | |
- 'sql_table/**' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Deploy using ssh | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.HOST }} | |
username: ${{ secrets.USERNAME }} | |
key: ${{ secrets.PRIVATE_KEY }} | |
port: 22 | |
script: | | |
cd ~/server/server-service | |
sudo git pull origin main | |
sudo git status | |
sudo npm install | |
sudo pm2 restart index |