diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index daa5062..611fe5e 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -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 @@ -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'