File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -43,18 +43,21 @@ jobs:
4343 with :
4444 name : forum-${{ env.VERSION }}.jar
4545 path : target/forum-${{ env.VERSION }}.jar
46+
4647 outputs :
4748 VERSION : ${{ steps.parse_version.outputs.VERSION }}
4849
4950 deploy :
5051 name : Deploy to Server
5152 runs-on : ubuntu-24.04
5253 needs : build
54+ env :
55+ VERSION : ${{ needs.build.outputs.VERSION }}
5356 steps :
5457 - name : Download the JAR file from build job
5558 uses : actions/download-artifact@v4
5659 with :
57- name : forum-${{ needs.build.outputs .VERSION }}.jar
60+ name : forum-${{ env .VERSION }}.jar
5861 path : ./
5962
6063 - name : Upload the JAR file to server
6366 host : ${{ secrets.HOST }}
6467 username : ${{ secrets.USERNAME }}
6568 password : ${{ secrets.SSH_PASSWORD }}
66- source : forum-${{ needs.build.outputs .VERSION }}.jar
69+ source : forum-${{ env .VERSION }}.jar
6770 target : /root/project/forum
6871
6972 - name : Start Service
7679 cd /root/project/forum
7780 jps -l | grep -E -i 'forum' | awk '{print "kill "$1}' | sh
7881 rm -rf logs
79- nohup java -jar forum-${{ needs.build.outputs .VERSION }}.jar --spring.profiles.active=dev >/dev/null 2>&1 &
80- echo 'forum-${{ needs.build.outputs .VERSION }} service started successfully.'
82+ nohup java -jar forum-${{ env .VERSION }}.jar --spring.profiles.active=dev >/dev/null 2>&1 &
83+ echo 'forum-${{ env .VERSION }} service started successfully.'
You can’t perform that action at this time.
0 commit comments