Skip to content

Commit

Permalink
add debugging step to deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelluethi committed Sep 24, 2024
1 parent ddff377 commit d50b46f
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
# Step 3: Grant execute permission for Gradle wrapper
- name: Grant execute permission for gradlew
run: chmod +x gradlew

# Step 4: Run tests with Gradle
- name: Run tests
run: ./gradlew test
Expand All @@ -47,11 +47,13 @@ jobs:
port: 22
script: |
# Navigate to the server directory and stop the old server (if running)
cd ${{ secrets.SERVER_PATH }}
pkill -f 'java -jar' || echo "No server running"
# Copy new files
rsync -avz --delete ./build/libs/*.jar ${{ secrets.SSH_USER }}@${{ secrets.SERVER_IP }}:${{ secrets.SERVER_PATH }}
# Start the new server
nohup java -jar ${{ secrets.SERVER_PATH }}/your-app.jar > output.log 2>&1 &
echo "here"
cd ${{ secrets.SERVER_PATH }} || echo "cannot change to directory"
echo "in right directory"
# pkill -f 'java -jar' || echo "No server running"
#
# # Copy new files
# rsync -avz --delete ./build/libs/*.jar ${{ secrets.SSH_USER }}@${{ secrets.SERVER_IP }}:${{ secrets.SERVER_PATH }}
#
# # Start the new server
# nohup java -jar ${{ secrets.SERVER_PATH }}/your-app.jar > output.log 2>&1 &

0 comments on commit d50b46f

Please sign in to comment.