반응형

전체 글 391

7. Github Actions 배포 자동화

배포 설정.github/workflows/deploy.ymlname: Deploy on Pushon: push: branches: - main # main 브랜치에 푸시될 때 실행jobs: deploy: runs-on: ubuntu-latest steps: # 1. 리포지토리 체크아웃 / 저장소 코드를 워크플로 실행 환경에 복사하는 GitHub에서 제공하는 공식 액션 - name: Checkout repository uses: actions/checkout@v3 # 2. SSH 키 설정 및 서버에 접속하여 빌드 실행 - name: Deploy to server env: SSH_PRIVATE_KEY:..

Dev/개발 일지 2025.02.02

코딩테스트를 위한 JavaScript 알고리즘

bfsstart - [x, y, time]end - [x, y]board - 이차원 배열 (O - 이동 가능 / X - 불가능)visited - 방문 기록 (방문 확인 1 / 미방문 0)start에서 end까지 가는 시간 계산시작시간은 start의 세번째 인자 기준으로 도달하지 못하는 경우 -1const bfs = (start, end, board) => { const dx = [-1, 1, 0, 0] const dy = [0, 0, -1, 1] const visited = Array.from({ length: board.length }, () => Array(board[0].length).fill(0)) visited[start[0]][start[1]] = 1 const qu..

Algorithm/theory 2025.01.27
반응형