Skip to content

Commit

Permalink
refactor(github) : target을 env로 분리
Browse files Browse the repository at this point in the history
  • Loading branch information
Woongbin06 committed Apr 16, 2024
1 parent c961481 commit 9fe8308
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
push:
branches: [ "master" ]

env:
TARGET_PATH: ${{ secrets.DIST_PATH }}

jobs:
build:

Expand Down Expand Up @@ -37,7 +40,7 @@ jobs:
username: ${{ secrets.SERVER_NAME }}
password: ${{ secrets.SERVER_PASSWORD }}
source: ${{ secrets.SOURCE_PATH }}
target: ${{ secrets.DIST_PATH }}
target: ${{ env.TARGET_PATH }}

- name: Execute jar file
uses: appleboy/ssh-action@master
Expand All @@ -49,4 +52,4 @@ jobs:
PID=$(lsof -ti:8080)
if [ -n "$PID" ]; then
kill $PID
nohup java -jar $${{ secrets.JAR_FILE }}
nohup java -jar ${{ secrets.JAR_FILE }}

0 comments on commit 9fe8308

Please sign in to comment.