Skip to content

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

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

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

Workflow file for this run

name: "deploy"
on:
workflow_dispatch:
push:
branches: [ "main" ]
tags-ignore: [ "**" ]
concurrency:
group: ${{ github.ref }}-build
cancel-in-progress: true
jobs:
build:
runs-on: "ubuntu-latest"
environment:
name: "production"
url: "https://webui.advntr.dev"
steps:
- name: "setup env"
id: "setup"
uses: "KyoriPowered/.github/.github/actions/setup-java-env@trunk"
with:
runtime_version: 21
publishing_branch_regex: "main"
gradle_warning_mode: "all"
- name: "build for production"
run: "./gradlew build"
- name: "setup / ssh"
uses: "webfactory/ssh-agent@v0.9.0"
with:
ssh-private-key: "${{ secrets.DOCKER_HOST_SSH_KEY }}"
- name: "setup / login to ghcr"
uses: "docker/login-action@v3.0.0"
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