Skip to content

Commit

Permalink
chore: 배포 스크립트 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
kariskan committed Aug 22, 2024
1 parent e075348 commit 38dd679
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,28 @@ jobs:
steps:
- name: checkout
uses: actions/checkout@v3

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'

- name: Check directory structure
run: |
pwd
ls -R
shell: bash

- name: make application-secret.yml
run: |
cd ./storage || exit 1
touch ./src/main/resources/application-secret.yml
echo "${{ secrets.SECRET }}" > ./src/main/resources/application-secret.yml
shell: bash

- name: Build with Gradle
run: |
cd ./storage || exit 1
chmod +x gradlew
chmod +x ./gradlew
./gradlew build -x test
- name: Create SSH key file
Expand All @@ -43,7 +48,7 @@ jobs:
SSH_HOST: ${{ secrets.HOST }}
SSH_PATH: ${{ secrets.PATH }}
run: |
scp -o StrictHostKeyChecking=no -i ssh_key.pem ./storage/build/libs/*.jar $SSH_USER@$SSH_HOST:$SSH_PATH
scp -o StrictHostKeyChecking=no -i ssh_key.pem ./build/libs/*.jar $SSH_USER@$SSH_HOST:$SSH_PATH
ssh -o StrictHostKeyChecking=no -i ssh_key.pem $SSH_USER@$SSH_HOST << EOF
cd $SSH_PATH
pkill -f '*.jar'
Expand Down

0 comments on commit 38dd679

Please sign in to comment.