Skip to content

Commit

Permalink
fix: clean homepage
Browse files Browse the repository at this point in the history
  • Loading branch information
abelr20 committed Aug 22, 2024
1 parent 7d1053d commit 076323d
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 6 deletions.
28 changes: 23 additions & 5 deletions .github/workflows/aws.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
docker buildx build --platform linux/amd64 --push -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .
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."
echo "Docker image $ECR_REPOSITORY:$IMAGE_TAG has been built and pushed to $ECR_REGISTRY"
- name: Deploy to Amazon ECS
run: |
Expand All @@ -66,7 +66,25 @@ jobs:
# Update the ECS service
aws ecs update-service --cluster ${{ env.ECS_CLUSTER }} --service ${{ env.ECS_SERVICE }} --force-new-deployment
# Wait until the service has stabilized (new tasks running, old tasks stopped)
aws ecs wait services-stable --cluster ${{ env.ECS_CLUSTER }} --services ${{ env.ECS_SERVICE }}
echo "Deployment successful and service is stable."
# Define the website URL and the desired status code
WEBSITE_URL="https://yourwebsite.com"
EXPECTED_STATUS_CODE=200
# Loop until the website returns the expected status code
while true; do
# Send a HEAD request to the website and capture the HTTP status code
HTTP_STATUS=$(curl -s -o /dev/null -w "%{http_code}" $WEBSITE_URL)
# Check if the status code matches the expected status code
if [ "$HTTP_STATUS" -eq "$EXPECTED_STATUS_CODE" ]; then
echo "Website is back up with status code $HTTP_STATUS."
break
else
echo "Website is still down. Current status code: $HTTP_STATUS."
fi
# Wait for a few seconds before the next check
sleep 5
done
echo "Deployment successful"
1 change: 0 additions & 1 deletion client/src/features/homepage/HomePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ const HomePage: React.FC = () => {
<div className='login-button-container'>
<div className='HpHeader'>
<h1> Welcome to SkyScraper </h1>
<h2> CI/CD </h2>
</div>
<div className='LoginButtonWrapper'>
{' '}
Expand Down

0 comments on commit 076323d

Please sign in to comment.