You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to deploy a simple jar file with nohup command directly using appleboy/ssh-action. The problem that I face is that the deployment is completed without any issues. But when I try to check the changes I find out that the changes don't happen. if I try to manually deploy the same thing from the server. it works. the only difference that is when I use manual deployment I have a .sh script which I run with nohup command. below is the script that I use
name: ssh-deploy
uses: appleboy/ssh-action@master
with:
host: ${{secrets.DEV_HOST}}
username: ${{secrets.DEV_USERNAME}}
key: ${{secrets.DEV_KEY}}
port: ${{secrets.DEV_PORT}}
script: |
nohup java -DB_HOST=${{secrets.DEV_DB_HOST}} -DB_USER=${{secrets.DEV_DB_USER}} -DB_PASS='${{secrets.DEV_DB_PASS}}' -DSENDGRID_API_KEY='S${{secrets.SENGRID_API_KEY}}' -DAWS_S3_BUCKET_NAME='${{secrets.DAWS_S3_BUCKET}}' -DAWS_S3_OBJECT_KEY='${{secrets.DAWS_S3_OBJECT_KEY}}' -jar ${{secrets.DEV_APP_FOLDER}}/example-SNAPSHOT.jar > /dev/null 2>&1 &
Can you please help me with this situation? I am trying to solve this for almost 2 weeks.
The text was updated successfully, but these errors were encountered:
I am also facing same issue. I have tried these mentioned solution but none of them worked for me. this is my workflow `filename: Deploy Spring Boot App
on:
push:
branches:
- master
jobs:
deploy:
runs-on: self-hosted
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Debug Port 8080 Usage
run: |
PORT_IN_USE=$(netstat -tuln | awk '$4 ~ /:8080$/ {print $7}' | cut -d'/' -f1)
if [ -z "$PORT_IN_USE" ]; then
echo "No process is using port 8080."
else
echo "Process using port 8080: $PORT_IN_USE"
echo "Killing process $PORT_IN_USE"
kill -9 "$PORT_IN_USE"
echo "Process killed"
fi
- name: Build and Deploy
run: |
cd /home/tanish/actions-runner/tryfid_spring/TryFidBE/TryFidBE
git pull origin master
echo "Building with Maven..."
mvn clean install
echo "Maven build completed"
- name: Complete
run: |
nohup java -jar target/tryfid-0.0.1-SNAPSHOT.jar > ./output.log 2>&1 &
echo "Deployment completed successfully."
I am trying to deploy a simple jar file with nohup command directly using appleboy/ssh-action. The problem that I face is that the deployment is completed without any issues. But when I try to check the changes I find out that the changes don't happen. if I try to manually deploy the same thing from the server. it works. the only difference that is when I use manual deployment I have a .sh script which I run with nohup command. below is the script that I use
uses: appleboy/ssh-action@master
with:
host: ${{secrets.DEV_HOST}}
username: ${{secrets.DEV_USERNAME}}
key: ${{secrets.DEV_KEY}}
port: ${{secrets.DEV_PORT}}
script: |
nohup java -DB_HOST=${{secrets.DEV_DB_HOST}} -DB_USER=${{secrets.DEV_DB_USER}} -DB_PASS='${{secrets.DEV_DB_PASS}}' -DSENDGRID_API_KEY='S${{secrets.SENGRID_API_KEY}}' -DAWS_S3_BUCKET_NAME='${{secrets.DAWS_S3_BUCKET}}' -DAWS_S3_OBJECT_KEY='${{secrets.DAWS_S3_OBJECT_KEY}}' -jar ${{secrets.DEV_APP_FOLDER}}/example-SNAPSHOT.jar > /dev/null 2>&1 &
Can you please help me with this situation? I am trying to solve this for almost 2 weeks.
The text was updated successfully, but these errors were encountered: