This commit is contained in:
@@ -0,0 +1,27 @@
|
|||||||
|
name: Deploy stack su Proxmox
|
||||||
|
|
||||||
|
# Deploy automatico dell'intero stack docker-compose sul CT Proxmox dedicato al
|
||||||
|
# deploy. Il runner Gitea gira su un CT diverso: la connessione avviene via SSH.
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Deploy via SSH (git pull + docker compose up -d --build)
|
||||||
|
uses: appleboy/ssh-action@v1
|
||||||
|
with:
|
||||||
|
host: ${{ secrets.DEPLOY_HOST }}
|
||||||
|
port: ${{ secrets.DEPLOY_PORT }}
|
||||||
|
username: ${{ secrets.DEPLOY_USER }}
|
||||||
|
key: ${{ secrets.DEPLOY_SSH_KEY }}
|
||||||
|
script: |
|
||||||
|
set -e
|
||||||
|
cd "${{ secrets.DEPLOY_PATH }}"
|
||||||
|
git fetch origin master
|
||||||
|
git reset --hard origin/master
|
||||||
|
docker compose up -d --build --remove-orphans
|
||||||
|
docker image prune -f
|
||||||
Reference in New Issue
Block a user