This commit is contained in:
@@ -6,43 +6,26 @@ on:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
build:
|
||||
build-and-deploy:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: 🧾 Repository auschecken
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: 🛠 Baue Projekt ohne Tests
|
||||
run: |
|
||||
./gradlew clean build -x test
|
||||
- name: 🛠 Baue das Projekt ohne Tests
|
||||
run: ./gradlew clean build -x test
|
||||
|
||||
- name: 📦 Archiviere Build-Artefakt
|
||||
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
|
||||
- name: 🚀 Übertrage JAR per SCP
|
||||
uses: appleboy/scp-action@v0.1.7
|
||||
with:
|
||||
host: ${{ secrets.DEPLOY_HOST }}
|
||||
username: ${{ secrets.DEPLOY_USER }}
|
||||
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/
|
||||
|
||||
- name: 🐳 Starte Compose remote via SSH
|
||||
- name: 🐳 Starte Docker Compose auf Remote-Server
|
||||
uses: appleboy/ssh-action@v1.0.0
|
||||
with:
|
||||
host: ${{ secrets.DEPLOY_HOST }}
|
||||
|
||||
Reference in New Issue
Block a user