Files
mytimetracker/.gitea/workflows/buildAndDeply.yaml
Nils Burghardt 76a81d4e07
Some checks failed
Build-und-Deploy / build-and-deploy (push) Failing after 1s
Build und Deploy / build-and-deploy (push) Failing after 15s
Build / build (push) Has been cancelled
add pipeline 7
2025-07-13 15:42:51 +02:00

49 lines
1.4 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
name: Build-und-Deploy
on:
push:
branches:
- master
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: 🧾 Repository auschecken
uses: actions/checkout@v3
- name: 📦 Docker installieren
run: |
sudo apt update
sudo apt install -y docker.io
- name: 🧼 IP-Adresse von Gitea zu /etc/hosts hinzufügen
run: echo "172.26.0.2 gitea" | sudo tee -a /etc/hosts
- name: 🛠 Baue das Projekt mit Gradle (mit Fallback)
run: |
echo "[INFO] Starte regulären Build mit Gradle..."
docker run --rm \
-v "$PWD":/app \
-w /app \
gradle:8.7-jdk21 \
./gradlew clean build -Pvaadin.productionMode -x test || \
(
echo "[WARN] Vaadin-Fehler versuche Build ohne vaadinPrepareFrontend..." && \
docker run --rm \
-v "$PWD":/app \
-w /app \
gradle:8.7-jdk21 \
./gradlew clean build -Pvaadin.productionMode -x test -x vaadinPrepareFrontend || \
(
echo "[ERROR] Build fehlgeschlagen Abbruch." && exit 1
)
)
- name: 🐳 Docker Compose Build & Deploy
run: docker compose -f ./compose.yml up -d --build
- name: 🧹 Clean Up (optional)
if: always()
run: docker system prune -f