Deployment workflow added

This commit is contained in:
Johannes Baumeister 2026-04-15 17:06:54 +02:00
parent 487dd047da
commit a87041a481
1 changed files with 30 additions and 0 deletions

View File

@ -0,0 +1,30 @@
# .gitea/workflows/deploy.yml
name: Deploy TrassenPlaner
run-name: ${{ gitea.actor }} is deploying the application
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Deploy via SSH
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.DEPLOY_HOST }}
username: ${{ secrets.DEPLOY_USER }}
key: ${{ secrets.DEPLOY_SSH_KEY }}
port: 22
script: |
# Verzeichnis prüfen und ggf. erstellen oder darin arbeiten
cd /home/${{ secrets.DEPLOY_USER }}/bwscheddebrock_trassenplaner || exit
git pull origin main
docker compose up -d --build
docker image prune -f