Files
TrisolarisServer/.gitea/workflows/build.yml
deploy 152bbbc575
Some checks failed
build-and-deploy / build-deploy (push) Has been cancelled
Use Gradle daemon in CI
2026-01-26 18:11:08 +05:30

33 lines
874 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 19
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: "19"
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
- name: Deploy jar and restart
run: |
set -e
sudo mkdir -p /opt/deploy/TrisolarisServer/build/libs
sudo cp -f build/libs/*.jar /opt/deploy/TrisolarisServer/build/libs/
sudo systemctl restart TrisolarisServer.service