creato file docker-compose e file deploy.yml
This commit is contained in:
parent
f3e418b6f7
commit
3ad8d89e5c
3 changed files with 44 additions and 0 deletions
28
.github/workflow/deploy.yml
vendored
Normal file
28
.github/workflow/deploy.yml
vendored
Normal 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
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
.env
|
||||
/node_modules
|
||||
14
docke-compose.yml
Normal file
14
docke-compose.yml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
version: '3.8'
|
||||
|
||||
services:
|
||||
react-app:
|
||||
build: .
|
||||
container_name: andreavillari
|
||||
restart: always
|
||||
env_file:
|
||||
- .env
|
||||
|
||||
ports:
|
||||
- "80:80"
|
||||
|
||||
|
||||
Loading…
Add table
Reference in a new issue