Skip to content

Commit

Permalink
Fixing ec2 host issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Daoud-Hussain authored Nov 19, 2024
2 parents 6709e89 + 8ad509d commit f536867
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/dev-cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ on:
push:
branches:
- dev
# pull_request:
# branches:
# - dev

env:
IMAGE_NAME: daoudhussaindev/next-js-app
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/prod-cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ on:
push:
branches:
- main
# pull_request:
# branches:
# - main

env:
IMAGE_NAME: daoudhussaindev/next-js-app
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/stagging-cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
Expand Down Expand Up @@ -140,7 +140,7 @@ jobs:
echo "Verifying deployment..."
sleep 15 # Give the application time to start
ssh -i ~/.ssh/deploy_key -o StrictHostKeyChecking=no ${{ secrets.EC2_USER }}@${{ secrets.EC2_HOST }} << EOF
if docker ps | grep -q ${{ env.CONTAINER_NAME }}; then
if docker ps | grep -q next-js-app-staging; then
echo 'Deployment verified successfully'
exit 0
else
Expand Down

0 comments on commit f536867

Please sign in to comment.