Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 15 additions & 4 deletions .github/workflows/deploy-one-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,19 @@ jobs:
- name: Build one-app
run: cd services/one-app && yarn build:one-app

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v2
with:
aws-access-key-id: ${{ env.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ env.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ env.AWS_REGION }}

- name: Log in to Amazon ECR Public
run: |
aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin ${{ env.ECR_REPOSITORY_URI }}

- name: Build Docker image for one-app
run: docker build -t ${{ env.ECR_REPOSITORY_URI }}:one-app-latest services/one-app/
run: docker build -t ${{ env.ECR_REPOSITORY_URI }}:one-app-latest -f Dockerfile .

- name: Push Docker image for one-app to Amazon ECR
run: docker push ${{ env.ECR_REPOSITORY_URI }}:one-app-latest
Expand All @@ -58,7 +69,7 @@ jobs:
run: |
TASK_DEF_ARN=$(aws ecs describe-services \
--cluster ${{ env.ECS_CLUSTER_NAME }} \
--services ${{ env.ECS_SERVICE_NAME_ONE_APP }} \
--services ${{ env.ECS_SERVICE_NAME }} \
--query 'services[0].taskDefinition' --output text)
echo "TASK_DEF_ARN_ONE_APP=$TASK_DEF_ARN" >> $GITHUB_ENV

Expand All @@ -84,7 +95,7 @@ jobs:
run: |
APPSPEC_CONTENT=$(cat appspec-one-app.yaml | jq -sR .)
aws deploy create-deployment \
--application-name ${{ env.CODEDEPLOY_APP_NAME_ONE_APP }} \
--deployment-group-name ${{ env.CODEDEPLOY_DEPLOYMENT_GROUP_ONE_APP }} \
--application-name ${{ env.CODEDEPLOY_APP_NAME }} \
--deployment-group-name ${{ env.CODEDEPLOY_DEPLOYMENT_GROUP }} \
--deployment-config-name CodeDeployDefault.ECSAllAtOnce \
--revision "{\"revisionType\":\"AppSpecContent\",\"appSpecContent\":{\"content\":$APPSPEC_CONTENT}}"
10 changes: 10 additions & 0 deletions services/one-app/src/common/hooks/useDebounce.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
import { useRef, useEffect, useCallback } from 'react';

/**
* useDebounce 훅은 μ£Όμ–΄μ§„ 콜백 ν•¨μˆ˜λ₯Ό μ§€μ •λœ μ§€μ—° μ‹œκ°„ λ™μ•ˆ μ§€μ—°μ‹œν‚΅λ‹ˆλ‹€.
* 주둜 μž…λ ₯ ν•„λ“œμ™€ 같은 μ‚¬μš©μž μΈν„°νŽ˜μ΄μŠ€μ—μ„œ μ‚¬μš©λ˜μ–΄,
* μ‚¬μš©μžκ°€ μž…λ ₯을 멈좘 ν›„μ—λ§Œ 콜백이 μ‹€ν–‰λ˜λ„λ‘ ν•©λ‹ˆλ‹€.
*
* @param callback - μ§€μ—°μ‹œν‚¬ 콜백 ν•¨μˆ˜
* @param delay - 콜백 ν•¨μˆ˜κ°€ μ‹€ν–‰λ˜κΈ° μ „μ˜ μ§€μ—° μ‹œκ°„ (λ°€λ¦¬μ΄ˆ)
* @returns μ§€μ—°λœ 콜백 ν•¨μˆ˜
*/

export function useDebounce<T extends any[]>(
callback: (...params: T) => void,
delay: number,
Expand Down
Loading