add pipeline 13
Some checks failed
Build-und-Deploy / build-and-deploy (push) Failing after 17s

This commit is contained in:
Nils Burghardt
2025-07-13 15:58:22 +02:00
parent afb869b482
commit 13dab82a7d

View File

@@ -6,43 +6,26 @@ on:
- master - master
jobs: jobs:
build: build-and-deploy:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: 🧾 Repository auschecken - name: 🧾 Repository auschecken
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: 🛠 Baue Projekt ohne Tests - name: 🛠 Baue das Projekt ohne Tests
run: | run: ./gradlew clean build -x test
./gradlew clean build -x test
- name: 📦 Archiviere Build-Artefakt - name: 🚀 Übertrage JAR per SCP
uses: actions/upload-artifact@v4
with:
name: app-jar
path: build/libs/MyTimeTracker-0.0.1-SNAPSHOT.jar
deploy:
needs: build
runs-on: ubuntu-latest
steps:
- name: 📥 Lade Artefakt herunter
uses: actions/download-artifact@v4
with:
name: app-jar
- name: 🚀 Deployment via SSH
uses: appleboy/scp-action@v0.1.7 uses: appleboy/scp-action@v0.1.7
with: with:
host: ${{ secrets.DEPLOY_HOST }} host: ${{ secrets.DEPLOY_HOST }}
username: ${{ secrets.DEPLOY_USER }} username: ${{ secrets.DEPLOY_USER }}
key: ${{ secrets.DEPLOY_KEY }} key: ${{ secrets.DEPLOY_KEY }}
source: MyTimeTracker-0.0.1-SNAPSHOT.jar source: build/libs/MyTimeTracker-0.0.1-SNAPSHOT.jar
target: /opt/mytimetracker/build/libs/ target: /opt/mytimetracker/build/libs/
- name: 🐳 Starte Compose remote via SSH - name: 🐳 Starte Docker Compose auf Remote-Server
uses: appleboy/ssh-action@v1.0.0 uses: appleboy/ssh-action@v1.0.0
with: with:
host: ${{ secrets.DEPLOY_HOST }} host: ${{ secrets.DEPLOY_HOST }}