Skip to content

Commit

Permalink
chore:deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
codernesty committed Aug 22, 2024
1 parent 45648e9 commit d87347e
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,26 +28,25 @@ jobs:
# Step 3: Deploy the backend service to AWS App Runner
- name: Deploy Backend
run: |
# AWS CLI command to update the backend service in AWS App Runner
aws apprunner update-service \
--service-arn $(aws apprunner list-services --query "ServiceSummaryList[?ServiceName=='${{ secrets.APP_RUNNER_SERVICE_NAME_BACKEND }}'].ServiceArn | [0]" --output text) \
--source-configuration SourceCodeRepository={"RepositoryUrl": "${{ secrets.REPOSITORY_URL }}", "SourceCodeVersion": {"Type": "BRANCH", "Value": "master"}, "SourceDirectory": "/linguaphoto"}
SERVICE_ARN=$(aws apprunner list-services --query "ServiceSummaryList[?ServiceName=='${{ secrets.APP_RUNNER_SERVICE_NAME_BACKEND }}'].ServiceArn | [0]" --output text)
if [ -z "$SERVICE_ARN" ]; then
echo "Error: Service ARN not found for service name ${{ secrets.APP_RUNNER_SERVICE_NAME_BACKEND }}."
exit 1
fi

# Update the backend service in AWS App Runner
aws apprunner update-service \
--service-arn "$SERVICE_ARN" \
--source-configuration "$(cat <<EOF
--service-arn "$SERVICE_ARN" \
--source-configuration "$(cat <<EOF
{
"CodeRepository": {
"RepositoryUrl": "${{ secrets.REPOSITORY_URL }}",
"SourceCodeVersion": {
"Type": "BRANCH",
"Value": "master"
},
"CodeConfiguration": {
"ConfigurationSource": "REPOSITORY"
},
"SourceDirectory": "/linguaphoto"
"SourceDirectory": "linguaphoto"
}
}
EOF
Expand Down

0 comments on commit d87347e

Please sign in to comment.