Skip to content

Basic campaign validation #345

Basic campaign validation

Basic campaign validation #345

Workflow file for this run

name: Java Deployment
on:
push:
branches:
- 'master'
- 'development'
pull_request:
branches:
- 'master'
- 'development'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up JDK 21 maven
uses: actions/setup-java@v2
with:
java-version: 21
distribution: 'adopt'
- name: Build with Maven
run: mvn -B clean package --file pom.xml
deploy:
runs-on: ubuntu-latest
needs: [ build ]
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
steps:
- name: Execute SSH Commands
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SSH_HOST }}
username: root
key: ${{ secrets.SSH_PRIVATE_KEY }}
port: 22
script_stop: true
script: |
cd /srv/tts-game/TTS-API
eval $(keychain --eval ../.ssh/api-key)
git pull origin master
mvn -B clean package --file pom.xml
service tts-api restart