creato file docker-compose e file deploy.yml

This commit is contained in:
Andre Villari 2026-10-19 16:08:38 +02:00
parent f3e418b6f7
commit 3ad8d89e5c
3 changed files with 44 additions and 0 deletions

28
.github/workflow/deploy.yml vendored Normal file
View file

@ -0,0 +1,28 @@
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

View file

@ -0,0 +1,2 @@
.env
/node_modules

14
docke-compose.yml Normal file
View file

@ -0,0 +1,14 @@
version: '3.8'
services:
react-app:
build: .
container_name: andreavillari
restart: always
env_file:
- .env
ports:
- "80:80"