EXPERIMENTAL: Implements sharding manager #81
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Continuous Integration | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '21' | |
- name: Build JAR with Gradle | |
run: | | |
chmod +x ./gradlew | |
./gradlew :foxy:shadowJar --no-daemon | |
- name: Deploy JAR to Server | |
env: | |
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} | |
SSH_HOST: ${{ secrets.SSH_HOST }} | |
SSH_USER: ${{ secrets.SSH_USER }} | |
SSH_PORT: ${{ secrets.SSH_PORT }} | |
SSH_TARGET: ${{ secrets.SSH_TARGET }} | |
run: | | |
mkdir -p ~/.ssh | |
echo "${SSH_PRIVATE_KEY}" > ~/.ssh/id_rsa | |
chmod 600 ~/.ssh/id_rsa | |
scp -o StrictHostKeyChecking=no -P $SSH_PORT foxy/build/libs/Foxy-*.jar $SSH_USER@$SSH_HOST:$SSH_TARGET/ | |
ssh -o StrictHostKeyChecking=no -p $SSH_PORT $SSH_USER@$SSH_HOST << EOF | |
echo "Deploy completed!" | |
EOF |