Deployment workflow added
This commit is contained in:
parent
487dd047da
commit
a87041a481
|
|
@ -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
|
||||||
Loading…
Reference in New Issue