From 23f8047e65f04423926ebb47bf52579bcca2d03c Mon Sep 17 00:00:00 2001 From: Danish Date: Fri, 1 Nov 2024 23:28:04 +0530 Subject: [PATCH] commented deplay jobs from workflow --- .github/workflows/docker.yml | 54 ++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index d8ff7ef..180d384 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -30,30 +30,30 @@ jobs: tags: ${{ secrets.DOCKER_USERNAME }}/backend-web:latest - deploy: - needs: build-and-share - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - 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: eu-north-1 - - - name: Deploy to EC2 - env: - PRIVATE_KEY: ${{ secrets.EC2_SSH_PRIVATE_KEY }} - HOST: ${{ secrets.EC2_HOST }} - USER: ${{ secrets.EC2_USER }} - run: | - echo "$PRIVATE_KEY" > private_key && chmod 600 private_key - ssh -o StrictHostKeyChecking=no -i private_key ${USER}@${HOST} ' - sudo docker compose pull && - sudo docker compose up -d && - sudo docker image prune -f && - sudo systemctl restart nginx - ' + # deploy: + # needs: build-and-share + # runs-on: ubuntu-latest + # steps: + # - name: Checkout code + # uses: actions/checkout@v3 + + # - 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: eu-north-1 + + # - name: Deploy to EC2 + # env: + # PRIVATE_KEY: ${{ secrets.EC2_SSH_PRIVATE_KEY }} + # HOST: ${{ secrets.EC2_HOST }} + # USER: ${{ secrets.EC2_USER }} + # run: | + # echo "$PRIVATE_KEY" > private_key && chmod 600 private_key + # ssh -o StrictHostKeyChecking=no -i private_key ${USER}@${HOST} ' + # sudo docker compose pull && + # sudo docker compose up -d && + # sudo docker image prune -f && + # sudo systemctl restart nginx + # '