From 59c770c1eeaff947417d261afe95189f51bbb550 Mon Sep 17 00:00:00 2001 From: Mohan Krishna G R <113445344+MohanKrishnaGR@users.noreply.github.com> Date: Wed, 26 Jun 2024 11:04:19 +0530 Subject: [PATCH] Update deploy.yml --- .github/workflows/deploy.yml | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index fc60d47..8b13789 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,32 +1 @@ -name: CI/CD Pipeline -on: - push: - branches: - - main - -jobs: - deploy: - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Set up SSH - uses: webfactory/ssh-agent@v0.5.3 - with: - ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} - - - name: Deploy to EC2 - run: | - ssh -o StrictHostKeyChecking=no ec2-user@your-ec2-instance-public-dns << 'EOF' - docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD - docker pull mohankrishnagr/infosys_text-summarization:final - docker stop $(docker ps -a -q) - docker rm $(docker ps -a -q) - docker run -d -p 8000:8000 mohankrishnagr/infosys_text-summarization:final - EOF - env: - DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} - DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}