Test Build & Deploy
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
name: Build and Deploy
|
name: Build und Deploy
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@@ -6,40 +6,18 @@ on:
|
|||||||
- master
|
- master
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build-and-deploy:
|
||||||
runs-on: local
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: 🧾 Repository auschecken
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Set up JDK
|
- name: 🛠 Baue das Projekt
|
||||||
uses: actions/setup-java@v3
|
|
||||||
with:
|
|
||||||
java-version: '17'
|
|
||||||
distribution: 'temurin'
|
|
||||||
|
|
||||||
- name: Install Node.js (für Vaadin)
|
|
||||||
uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version: '20'
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: npm install
|
|
||||||
|
|
||||||
- name: Build application
|
|
||||||
run: ./gradlew build
|
|
||||||
|
|
||||||
deploy:
|
|
||||||
runs-on: local
|
|
||||||
needs: build
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Deploy via Docker Compose
|
|
||||||
run: |
|
run: |
|
||||||
cd compose
|
echo "🔧 Baue Projekt..."
|
||||||
docker compose down
|
./gradlew build
|
||||||
docker compose up -d --build
|
|
||||||
|
- name: 🚀 Deployment ausführen
|
||||||
|
run: |
|
||||||
|
echo "📦 Starte Deployment..."
|
||||||
|
docker compose -f ./compose.yml up -d --build
|
||||||
Reference in New Issue
Block a user