diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml new file mode 100644 index 0000000..24064b1 --- /dev/null +++ b/.gitea/workflows/ci.yml @@ -0,0 +1,21 @@ +name: "deploy" + +on: + push: + branches: + - master + +jobs: + deploy: + runs-on: ubuntu-22.04 + steps: + - name: Cloning repo + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Push to dokku + uses: dokku/github-action@master + with: + git_remote_url: "ssh://dokku@10.0.3.39:22/minecraft-helper" + ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }} \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..16dd517 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,9 @@ +FROM fascinated/docker-images:java_17 + +RUN apt-get update && apt-get install -y \ + maven \ + && rm -rf /var/lib/apt/lists/* + +RUN mvn clean package + +CMD ["java", "-jar", "target/Minecraft-Helper-1.0-SNAPSHOT.jar"] \ No newline at end of file diff --git a/pom.xml b/pom.xml index 45acea1..69bcb28 100644 --- a/pom.xml +++ b/pom.xml @@ -61,6 +61,7 @@ net.jodah expiringmap 0.5.11 + compile diff --git a/src/main/java/cc/fascinated/player/PlayerManagerService.java b/src/main/java/cc/fascinated/player/PlayerManagerService.java index ce238da..a576d03 100644 --- a/src/main/java/cc/fascinated/player/PlayerManagerService.java +++ b/src/main/java/cc/fascinated/player/PlayerManagerService.java @@ -19,7 +19,6 @@ import java.util.concurrent.TimeUnit; @Service @Log4j2 public class PlayerManagerService { - private static final Logger log = LoggerFactory.getLogger(PlayerManagerService.class); /** * The cache of players. */