gitea / workflows/deploy.yaml aktualisiert
This commit is contained in:
parent
6052d95a82
commit
dfcf4fd9bd
|
|
@ -1,13 +1,36 @@
|
|||
- name: Deploy auf Server
|
||||
name: Deploy Standortplaner
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Code holen
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Deployment auf Server
|
||||
uses: appleboy/ssh-action@master
|
||||
with:
|
||||
host: ${{ secrets.SERVER_HOST }}
|
||||
username: ${{ secrets.SERVER_USER }}
|
||||
key: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
script: |
|
||||
cd /opt/automation-stack/bw-samern-ohne
|
||||
git pull
|
||||
# .env Datei wird hier durch die secrets neu geschrieben
|
||||
echo "DB_NAME=${{ secrets.DB_NAME }}" > .env
|
||||
# ... (weitere env Variablen)
|
||||
# Ordner erstellen, falls nicht vorhanden
|
||||
mkdir -p /opt/automation-stack/standortplaner
|
||||
cd /opt/automation-stack/standortplaner
|
||||
|
||||
# .env Datei mit den Secrets befüllen
|
||||
echo "DB_HOST=${{ secrets.DB_HOST }}" > .env
|
||||
echo "DB_PORT=${{ secrets.DB_PORT }}" >> .env
|
||||
echo "DB_USER=${{ secrets.DB_USER }}" >> .env
|
||||
echo "DB_PASSWORD=${{ secrets.DB_PASSWORD }}" >> .env
|
||||
echo "DB_NAME=${{ secrets.DB_NAME }}" >> .env
|
||||
echo "OIDC_CLIENT_ID=${{ secrets.OIDC_CLIENT_ID }}" >> .env
|
||||
echo "OIDC_CLIENT_SECRET=${{ secrets.OIDC_CLIENT_SECRET }}" >> .env
|
||||
|
||||
# App starten
|
||||
docker compose up -d --build --force-recreate
|
||||
Loading…
Reference in New Issue