Skip to content

Commit

Permalink
fix: revert to working workflow, fix icon path
Browse files Browse the repository at this point in the history
  • Loading branch information
abelr20 committed Aug 22, 2024
1 parent 55a1868 commit 3af178a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 23 deletions.
28 changes: 6 additions & 22 deletions .github/workflows/aws.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ concurrency:
cancel-in-progress: true

env:
AWS_REGION: ${{ secrets.AWS_REGION }} # Use GitHub secrets for AWS region
AWS_REGION: ${{ secrets.AWS_REGION }} # Use GitHub secret for AWS region
ECR_REPOSITORY: app # Set this to your Amazon ECR repository name
ECS_SERVICE: SkyDevOps # Set this to your Amazon ECS service name
ECS_CLUSTER: Sky # Set this to your Amazon ECS cluster name
Expand Down Expand Up @@ -37,36 +37,20 @@ jobs:
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}

- name: Login to AWS ECR
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2

- name: Build and push new Docker image to AWS ECR
- name: Build and push image to AWS ECR
id: build-image
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
IMAGE_TAG: latest
run: |
# Enable error handling
set -e
set -o pipefail
# Use Docker Buildx to build the image for x86_64
docker buildx build --platform linux/amd64 --push -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .
# Use Docker Buildx to build the image for ARM64
docker buildx build --platform linux/arm64 --push -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .
echo "image=$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG" >> $GITHUB_OUTPUT
- name: Deploy to AWS ECS
run: |
# Enable error handling
set -e
set -o pipefail
# Update the ECS service and capture output
UPDATE_OUTPUT=$(aws ecs update-service \
--cluster ${{ env.ECS_CLUSTER }} \
--service ${{ env.ECS_SERVICE }})
# Wait until the service has stabilized
aws ecs wait services-stable \
--cluster ${{ env.ECS_CLUSTER }} \
--services ${{ env.ECS_SERVICE }}
aws ecs update-service --cluster ${{ env.ECS_CLUSTER }} --service ${{ env.ECS_SERVICE }} --force-new-deployment
2 changes: 1 addition & 1 deletion client/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<script nomodule src="https://unpkg.com/[email protected]/dist/ionicons/ionicons.js"></script>

<!-- Favicon -->
<link rel="icon" href="/favicon.ico" />
<link rel="icon" href="favicon.ico" />

<!-- Preconnect for Google Fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com">
Expand Down

0 comments on commit 3af178a

Please sign in to comment.