diff --git a/.github/workflows/deploy-dev.yml b/.github/workflows/deploy-dev.yml index 3b03cc6..1718614 100644 --- a/.github/workflows/deploy-dev.yml +++ b/.github/workflows/deploy-dev.yml @@ -30,11 +30,11 @@ jobs: - name: Send env file uses: appleboy/scp-action@master with: - username: root - host: ${{ secrets.NCP_DEV_IP }} - password: ${{ secrets.NCP_PASSWORD }} + username: ubuntu + host: ${{ secrets.AWS_DEV_IP }} + key: ${{ secrets.AWS_PASSWORD }} source: "./.env" - target: "/home/ubuntu" + target: "/home" # 빌드 - name: Build with Gradle @@ -51,23 +51,23 @@ jobs: - name: Send docker-compose.yml uses: appleboy/scp-action@master with: - username: root - host: ${{ secrets.NCP_DEV_IP }} - password: ${{ secrets.NCP_PASSWORD }} + username: ubuntu + host: ${{ secrets.AWS_DEV_IP }} + key: ${{ secrets.AWS_PASSWORD }} port: 22 source: "./.docker/docker-compose.yml" - target: "/home/ubuntu/" + target: "/home" # 도커 컴포즈 실행 - name: Deploy to Dev uses: appleboy/ssh-action@master with: - username: root - host: ${{ secrets.NCP_DEV_IP }} - password: ${{ secrets.NCP_PASSWORD }} + username: ubuntu + host: ${{ secrets.AWS_DEV_IP }} + key: ${{ secrets.AWS_PASSWORD }} script: | - sudo cp /home/ubuntu/.docker/docker-compose.yml /home/ubuntu - cd /home/ubuntu + sudo cp /home/.docker/docker-compose.yml /home + cd /home sudo docker pull ${{ secrets.DOCKER_USERNAME }}/${{ secrets.DOCKER_REPO }} docker-compose up -d docker image prune -f