Skip to content

Merge branch 'main' of github.com:CrawKatt/plantita_ayudante #51

Merge branch 'main' of github.com:CrawKatt/plantita_ayudante

Merge branch 'main' of github.com:CrawKatt/plantita_ayudante #51

Workflow file for this run

name: Deploy Plantita Ayudante Bot
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup SSH
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_KEY }}
- name: Deploy to VPS
run: |
ssh -o StrictHostKeyChecking=no -p ${{ secrets.SSH_PORT }} ${{ secrets.VPS_USER }}@${{ secrets.VPS_IP }} << 'EOF'
cd ~/plantita_ayudante
git pull
if ! cargo build --release; then
echo "Compilation failed, stopping deployment"
exit 1
fi
cp -fu target/release/plantita_ayudante ~/plantita_ayudante/
sudo systemctl restart plantita_ayudante.service
EOF