Skip to content

Merge pull request #24 from LetsExercise/feat-personalGoal #16

Merge pull request #24 from LetsExercise/feat-personalGoal

Merge pull request #24 from LetsExercise/feat-personalGoal #16

Workflow file for this run

name: Deploy to Linux Server
on:
push:
branches: [ develop ]
pull_request:
branches: [ develop ]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install sshpass
run: sudo apt-get install -y sshpass
- name: Deploy and start the project
env:
SSH_IP: ${{ secrets.SSH_IP }}
SSH_PASSWORD: ${{ secrets.SSH_PASSWORD }}
SSH_PORT: ${{ secrets.SSH_PORT }}
run: |
sshpass -p $SSH_PASSWORD ssh -o StrictHostKeyChecking=no -p $SSH_PORT castberry@$SSH_IP << 'EOF'
cd /home/castberry/dailypet
git pull
npm install
pm2 restart dailypet-dev || pm2 start npm --name "dailypet-dev" -- run start
EOF