Merge pull request #22 from ToothyDev/add_vision #77
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 | |
on: | |
push | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up SSH | |
uses: webfactory/[email protected] | |
with: | |
ssh-private-key: ${{ secrets.SSH_PRIVATE }} | |
- name: Deploy to VPS | |
run: | | |
ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USER }}@${{ secrets.SSH_IP }} << 'EOF' | |
cd Paw | |
git pull origin main | |
venv/bin/pip install -r requirements.txt | |
WATCH_MODE=$(pm2 jlist | jq -r '.[] | select(.name == "paw") | .pm2_env.watch') | |
if [[ "$WATCH_MODE" != "true" ]]; then | |
pm2 restart paw --watch | |
fi | |
EOF |