eliminata la prima build in .github/workflow/deploy.yml
All checks were successful
Deploy to VPS / deploy (push) Successful in 41s

This commit is contained in:
Andre Villari 2026-10-08 17:46:11 +02:00
parent 51fbaba16b
commit e76d6e5c35

View file

@ -4,31 +4,10 @@ on:
push: push:
branches: branches:
- main - main
workflow_dispatch: workflow_dispatch:
jobs: jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: https://github.com/actions/checkout@v4
- name: Setup Node.js
uses: https://github.com/actions/setup-node@v4
with:
node-version: "20"
- name: Install dependencies
run: npm ci --prefer-offline
- name: Build
run: npm run build
deploy: deploy:
needs: build
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
@ -37,17 +16,13 @@ jobs:
- name: Deploy via SSH - name: Deploy via SSH
uses: https://github.com/appleboy/ssh-action@v1.0.3 uses: https://github.com/appleboy/ssh-action@v1.0.3
with: with:
host: ${{ secrets.VPS_HOST }} host: ${{ secrets.VPS_HOST }}
username: ${{ secrets.VPS_USER }} username: ${{ secrets.VPS_USER }}
key: ${{ secrets.VPS_SSH_KEY }} key: ${{ secrets.VPS_SSH_KEY }}
script: | script: |
set -e
echo "START DEPLOY" echo "START DEPLOY"
cd /root/magricambi cd /root/magricambi
git pull --ff-only git pull --ff-only
docker compose up -d --build docker compose up -d --build