Skip to content

Commit

Permalink
fix: workflow message updates
Browse files Browse the repository at this point in the history
  • Loading branch information
abelr20 committed Aug 23, 2024
1 parent 608c4c8 commit c41a0c0
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/aws.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ permissions:

jobs:
deploy:
name: Deploy
name: Deploy to AWS ECS
runs-on: ubuntu-latest
environment: production

Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:
echo "image=$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG" >> $GITHUB_OUTPUT
echo "Docker image $ECR_REPOSITORY:$IMAGE_TAG has been built and pushed to $ECR_REGISTRY"
- name: Deploy to Amazon ECS
- name: Deploy to AWS ECS
run: |
# Update the ECS service
aws ecs update-service --cluster ${{ env.ECS_CLUSTER }} --service ${{ env.ECS_SERVICE }} --force-new-deployment
Expand All @@ -67,6 +67,7 @@ jobs:
EXPECTED_STATUS_CODE=200
# Loop until the website returns the expected status code
# Wait 30 seconds before sending request
sleep 30
while true; do
# Send a HEAD request to the website and capture the HTTP status code
Expand All @@ -77,11 +78,11 @@ jobs:
echo "Website is back up with status code $HTTP_STATUS"
break
else
echo "Website is still down. Current status code: $HTTP_STATUS"
echo "Website down. Current status code: $HTTP_STATUS"
fi
# Wait for a few seconds before the next check
sleep 5
# Wait 10 seconds before the next check
sleep 10
done
echo "Website online"
echo "Deployment successful"

0 comments on commit c41a0c0

Please sign in to comment.