Files
androidlover5842 14f739a54f
All checks were successful
build-and-deploy / build-deploy (push) Successful in 1m2s
change java version
2026-01-26 19:25:23 +05:30

33 lines
884 B
YAML

name: build-and-deploy
on:
push:
branches: [ "master" ]
jobs:
build-deploy:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: "21"
cache: gradle
- name: Build (skip tests)
env:
GRADLE_OPTS: "-Dorg.gradle.internal.http.connectionTimeout=60000 -Dorg.gradle.internal.http.socketTimeout=60000 -Dorg.gradle.workers.max=6"
run: ./gradlew build -x test --info --stacktrace
- name: Deploy jar and restart
run: |
set -e
mkdir -p /opt/deploy/TrisolarisServer/build/libs
cp -f build/libs/*.jar /opt/deploy/TrisolarisServer/build/libs/
sudo systemctl restart TrisolarisServer.service