Skip to content

Add role check for STOMP /game/admin-act messages #11

Add role check for STOMP /game/admin-act messages

Add role check for STOMP /game/admin-act messages #11

Workflow file for this run

name: Deploy backend
on:
workflow_dispatch:
push:
branches:
- master
paths:
- backend/**
- .github/workflows/backend.yml
jobs:
build:
name: Build and Deploy
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: '21'
distribution: 'corretto'
cache: maven
- name: Build with Maven
working-directory: backend
run: mvn clean package
- name: Deploy to AWS
working-directory: backend
run: |
echo "${{ secrets.AWS_SSH_KEY }}" | tr -d '\r' > key.pem
chmod 400 key.pem
mkdir -p ~/.ssh/ && touch ~/.ssh/known_hosts
ssh-keyscan ${{ secrets.AWS_HOST }} >> ~/.ssh/known_hosts
scp -i key.pem target/backend-*.jar ubuntu@${{ secrets.AWS_HOST }}:/home/ubuntu/bursdag/bursdag.jar
ssh -i key.pem ubuntu@${{ secrets.AWS_HOST }} fuser -k 8081/tcp | true
ssh -i key.pem ubuntu@${{ secrets.AWS_HOST }} java -jar /home/ubuntu/bursdag/bursdag.jar --spring.config.location=classpath:/application.yml,/home/ubuntu/bursdag/application.yml -Xms512m -Xmx512m & disown