diff --git a/.github/workflows/auto-deployment.yml b/.github/workflows/auto-deployment.yml index 3c77bcd..76e5746 100644 --- a/.github/workflows/auto-deployment.yml +++ b/.github/workflows/auto-deployment.yml @@ -12,6 +12,11 @@ jobs: runs-on: ubuntu-latest + env: + host: ${{ secrets.EC2_HOST }} + username: ${{ secrets.EC2_USERNAME }} + private_key: ${{ secrets.EC2_PRIVATE_KEY }} + steps: - uses: actions/checkout@v4.1.2 - name: Show git status @@ -35,10 +40,6 @@ jobs: ./gradlew bootJar ./gradlew jarDir - name: Connect to EC2 - env: - host: ${{ secrets.EC2_HOST }} - username: ${{ secrets.EC2_USERNAME }} - private_key: ${{ secrets.EC2_PRIVATE_KEY }} run: | echo "$private_key" > private_key.pem chmod 400 private_key.pem