Skip to content

Commit

Permalink
Update deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
jayvarner committed Jul 9, 2024
1 parent a61845f commit 15efb89
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ echo "Running deploy script"
TAG=$([ "$BRANCH" == "main" ] && echo "latest" || echo "dev")

echo "Logging in to AWS"
aws ecr get-login-password --region us-east-1 | \
aws ecr get-login-password --region ${AWS_REGION} | \
docker login --username AWS --password-stdin "${AWS_ECR}"
echo "Logged in successfully"

Expand All @@ -20,4 +20,5 @@ docker tag georgia-coast-atlas "${AWS_ECR}/georgia-coast-atlas:${TAG}"
echo "Pushing image"
docker push "${AWS_ECR}/georgia-coast-atlas:${TAG}"

echo "Pushed succesfully"
echo "Forcing new deployment"
aws ecs update-service --cluster ${AWS_ECS_CLUSTER} --service ${AWS_ECS_SERVICE} --force-new-deployment --region ${AWS_REGION}
3 changes: 3 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,7 @@ jobs:
env:
BRANCH: ${{ github.head_ref || github.ref_name }}
AWS_ECR: ${{ secrets.AWS_ECR }}
AWS_ECS_CLUSTER: ${{ secrets.AWS_ECS_CLUSTER }}
AWS_ECS_SERVICE: ${{ secrets.AWS_ECS_SERVICE }}
AWS_REGION: ${{ secrets.AWS_REGION }}
run: ./deploy.sh

0 comments on commit 15efb89

Please sign in to comment.