diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index faf09552..46935e39 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,12 +1,13 @@ name: CI/CD test on: - pull_request: - branches: "develop" + pull_request_target: + types: [closed] jobs: build: - if: github.event_name == 'push' + environment: aws + if: github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'develop' runs-on: ubuntu-latest permissions: @@ -20,12 +21,11 @@ jobs: with: java-version: '17' distribution: 'oracle' - + - name: echo test run: | echo "EC2_PUBLIC_IP: ${{ secrets.EC2_PUBLIC_IP }}" echo "DB_USERNAME: ${{ secrets.DB_USERNAME }}" - - name: Setup SSH uses: webfactory/ssh-agent@v0.9.0 with: