.gitea/workflows/deploy.yml aktualisiert
Debug Runner Path / debug (push) Successful in 0s
Details
Debug Runner Path / debug (push) Successful in 0s
Details
This commit is contained in:
parent
e779943a3e
commit
f2e16b8d04
|
|
@ -1,35 +1,18 @@
|
||||||
name: Deploy TrassenPlaner
|
name: Debug Runner Path
|
||||||
run-name: ${{ gitea.actor }} is deploying
|
on: [push]
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
debug:
|
||||||
runs-on: host
|
runs-on: host
|
||||||
steps:
|
steps:
|
||||||
- name: Manual Deploy (Local)
|
- name: Where am I and who am I?
|
||||||
run: |
|
run: |
|
||||||
# 1. In den Ordner gehen (wir nehmen root, da du als root arbeitest)
|
echo "--- NUTZER ---"
|
||||||
mkdir -p /root/bwscheddebrock_trassenplaner
|
whoami
|
||||||
cd /root/bwscheddebrock_trassenplaner || exit
|
echo "--- PFAD ---"
|
||||||
|
pwd
|
||||||
# 2. Code aktualisieren
|
echo "--- DATEISYSTEM ---"
|
||||||
if [ -d ".git" ]; then
|
df -h .
|
||||||
git pull origin main
|
echo "--- TEST-DATEI ERSTELLEN ---"
|
||||||
else
|
touch /root/ICH_WAR_HIER.txt
|
||||||
git clone https://git.enwelo-serverumgebung.cloud/gitea-enwelo-jba/bwscheddebrock_trassenplaner.git .
|
ls -la /root/ICH_WAR_HIER.txt
|
||||||
fi
|
|
||||||
|
|
||||||
# 3. .env-Datei aus Gitea-Secrets generieren
|
|
||||||
echo "DB_HOST=${{ secrets.DB_HOST }}" > .env
|
|
||||||
echo "DB_PORT=5433" >> .env
|
|
||||||
echo "DB_USER=${{ secrets.DB_USER }}" >> .env
|
|
||||||
echo "DB_PASSWORD='${{ secrets.DB_PASSWORD }}'" >> .env
|
|
||||||
echo "DB_NAME=${{ secrets.DB_NAME }}" >> .env
|
|
||||||
echo "DB_SCHEMA=bw_scheddebrock" >> .env
|
|
||||||
|
|
||||||
# 4. Docker Befehle (absoluter Pfad zur Sicherheit)
|
|
||||||
/usr/bin/docker compose up -d --build --force-recreate
|
|
||||||
/usr/bin/docker image prune -f
|
|
||||||
Loading…
Reference in New Issue