deploy to dice-tower.com
All checks were successful
CI / deploy (push) Successful in 5m23s

This commit is contained in:
Arindy 2025-02-16 13:40:41 +01:00
parent 1c7e793fb2
commit 92d3ba3502
3 changed files with 30 additions and 1 deletions

View File

@ -43,7 +43,14 @@ jobs:
name: Version name: Version
run: echo "VERSION=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)" >> ${GITHUB_OUTPUT} run: echo "VERSION=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)" >> ${GITHUB_OUTPUT}
- name: Build Container - name: Build unstable Container
if: github.ref_name != 'main'
run: |
echo ${{secrets.PACKAGES_TOKEN}} | docker login --username ${{ secrets.PACKAGES_USER }} --password-stdin git.arindy.de
docker build -f src/main/docker/Dockerfile.native-micro -t git.arindy.de/arindy/dice-tower:unstable -t git.arindy.de/arindy/dice-tower:${{ steps.version.outputs.VERSION }} .
docker push git.arindy.de/arindy/dice-tower:unstable
- name: Build stable Container
if: github.ref_name == 'main' if: github.ref_name == 'main'
run: | run: |
echo ${{secrets.PACKAGES_TOKEN}} | docker login --username ${{ secrets.PACKAGES_USER }} --password-stdin git.arindy.de echo ${{secrets.PACKAGES_TOKEN}} | docker login --username ${{ secrets.PACKAGES_USER }} --password-stdin git.arindy.de
@ -51,10 +58,28 @@ jobs:
docker push git.arindy.de/arindy/dice-tower:${{ steps.version.outputs.VERSION }} docker push git.arindy.de/arindy/dice-tower:${{ steps.version.outputs.VERSION }}
docker push git.arindy.de/arindy/dice-tower:latest docker push git.arindy.de/arindy/dice-tower:latest
- name: Prepare deploy
run: |
echo ${{secrets.SSH_KNOWN_HOSTS}} >> ~/.ssh/known_hosts
base64 -d <<< ${{secrets.SSH_KEY}} > ./.key
chmod 600 ./.key
- name: Deploy unstable
if: github.ref_name != 'main'
run: "ssh -i ./.key dice-tower@${{secrets.SSH_HOST}} 'docker compose -f compose.unstable.yml up --force-recreate -d' "
- name: Deploy - name: Deploy
if: github.ref_name == 'main'
run: "ssh -i ./.key dice-tower@${{secrets.SSH_HOST}} 'docker compose -f compose.yml up --force-recreate -d' "
- name: Deploy local
if: github.ref_name == 'main' if: github.ref_name == 'main'
run: "docker compose up -d" run: "docker compose up -d"
- name: clean up
run: |
rm ./.key
- name: create tag - name: create tag
if: github.ref_name == 'main' if: github.ref_name == 'main'
run: | run: |

2
.gitignore vendored
View File

@ -124,3 +124,5 @@ fabric.properties
# Android studio 3.1+ serialized cache file # Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser .idea/caches/build_file_checksums.ser
.key
.key/

View File

@ -19,6 +19,8 @@
<meta name="twitter:image" content="https://dice-tower.com/rich.png"> <meta name="twitter:image" content="https://dice-tower.com/rich.png">
<meta name="description" content=" <meta name="description" content="
Dice-Tower Version {version}
Easy to use online dice rolling with customizable overlays. Easy to use online dice rolling with customizable overlays.
"> ">