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
|
uses: appleboy/ssh-action@master
|
||||||
with:
|
with:
|
||||||
host: ${{ secrets.SERVER_HOST }}
|
host: ${{ secrets.SERVER_HOST }}
|
||||||
username: ${{ secrets.SERVER_USER }}
|
username: ${{ secrets.SERVER_USER }}
|
||||||
key: ${{ secrets.SSH_PRIVATE_KEY }}
|
key: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||||
script: |
|
script: |
|
||||||
cd /opt/automation-stack/bw-samern-ohne
|
# Ordner erstellen, falls nicht vorhanden
|
||||||
git pull
|
mkdir -p /opt/automation-stack/standortplaner
|
||||||
# .env Datei wird hier durch die secrets neu geschrieben
|
cd /opt/automation-stack/standortplaner
|
||||||
echo "DB_NAME=${{ secrets.DB_NAME }}" > .env
|
|
||||||
# ... (weitere env Variablen)
|
# .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
|
docker compose up -d --build --force-recreate
|
||||||
Loading…
Reference in New Issue