andreavillari/.github/workflow/deploy.yml
2026-10-19 16:08:38 +02:00

28 lines
No EOL
620 B
YAML

name: Deploy to VPS
on:
push:
branches:
- main
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: https://github.com/actions/checkout@v4
- name: Deploy via SSH
uses: https://github.com/appleboy/ssh-action@v1.0.3
with:
host: ${{ secrets.VPS_HOST }}
username: ${{ secrets.VPS_USER }}
key: ${{ secrets.VPS_SSH_KEY }}
script: |
set -e
echo "START DEPLOY"
cd /root/andreavillari
git pull --ff-only
docker compose up -d --build