corrierifrontend/.github/workflows/deploy.yml
AV77web 4df3e1d432
Some checks failed
Deploy to VPS / build (push) Successful in 21s
Deploy to VPS / deploy (push) Failing after 4s
correzione a .github/workflows/deploy.yml
2026-06-21 00:53:56 +02:00

36 lines
No EOL
912 B
YAML

name: Deploy to VPS
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: https://github.com/actions/checkout@v4
- uses: https://github.com/actions/setup-node@v4
with:
node-version: "20"
- run: npm ci --prefer-offline
- run: npm run build
env:
VITE_API_URL: https://prenotazionibackend.andreavillari.it
deploy:
needs: build
runs-on: ubuntu-latest
steps:
- uses: https://github.com/actions/checkout@v4
- 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: |
echo "START DEPLOY"
cd /root/corrierifrontend
git pull --ff-only
docker compose up -d --build