From e9643ff3870802aed9efa1c8c1c05802d81c88e0 Mon Sep 17 00:00:00 2001 From: gabang2 Date: Wed, 10 Jul 2024 00:11:48 +0900 Subject: [PATCH] =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 0bce40a..a4c0173 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -16,6 +16,13 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@v1 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: ap-northeast-2 + - name: Deploy to EC2 run: | echo "${{ secrets.EC2_SSH_KEY }}" > key.pem @@ -28,13 +35,6 @@ jobs: env: DATABASE_URL: ${{ secrets.DATABASE_URL }} - - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@v1 - with: - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: ap-northeast-2 - - name: Login to Amazon ECR run: | aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws