Skip to content

Merge pull request #180 from KyoriPowered/renovate/patch-release-depe… #139

Merge pull request #180 from KyoriPowered/renovate/patch-release-depe…

Merge pull request #180 from KyoriPowered/renovate/patch-release-depe… #139

Workflow file for this run

name: "deploy"
on:
workflow_dispatch:
push:
branches:
- main
concurrency:
group: ${{ github.ref }}-build
cancel-in-progress: true
env:
JAVA_VERSION: 17
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: "checkout repository"
uses: "actions/checkout@v4"
- name: "setup jdk ${{ env.JAVA_VERSION }}"
uses: "actions/setup-java@v3"
with:
distribution: "temurin"
java-version: "${{ env.JAVA_VERSION }}"
- name: "validate gradle wrapper"
uses: "gradle/wrapper-validation-action@v1"
- name: "build for production"
uses: "gradle/gradle-build-action@v2"
with:
arguments: "build"
- name: "setup ssh"
uses: webfactory/ssh-agent@v0.8.0
with:
ssh-private-key: ${{ secrets.DOCKER_HOST_SSH_KEY }}
- name: "login to ghcr"
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: "publish / docker image"
run: ./gradlew jib -Djib.console=plain
- name: "publish / deploy to production"
env:
DOCKER_HOST: "${{ secrets.DOCKER_HOST }}"
run: |
echo ${{ secrets.DOCKER_HOST_SSH_SIG }} > ~/.ssh/known_hosts
docker stack deploy --with-registry-auth --compose-file=docker-compose.yml adventure-webui