41 lines
940 B
YAML
41 lines
940 B
YAML
name: Build und Deploy
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
build-and-deploy:
|
|
runs-on: ubuntu-latest
|
|
|
|
container:
|
|
image: node:20-bullseye
|
|
options: --user=root
|
|
|
|
steps:
|
|
- name: Checkout Repository
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Install Dependencies
|
|
run: |
|
|
apt-get update && apt-get install -y unzip curl git
|
|
curl -s "https://get.sdkman.io" | bash
|
|
export SDKMAN_DIR="/root/.sdkman"
|
|
source "$SDKMAN_DIR/bin/sdkman-init.sh"
|
|
sdk install java 21.0.2-tem
|
|
sdk install gradle 8.7
|
|
|
|
- name: Make Gradle Wrapper Executable
|
|
run: chmod +x ./gradlew
|
|
|
|
- name: Build Project
|
|
run: ./gradlew build
|
|
|
|
- name: Docker Compose Build and Deploy
|
|
run: |
|
|
docker compose -f ./compose.yml up -d --build
|
|
|
|
- name: Clean up Docker
|
|
if: always()
|
|
run: docker system prune -f |