diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 5042da6..be0253c 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -4,6 +4,7 @@ on: push: branches: - main + - deploy/** # 권한 설정 permissions: @@ -37,8 +38,8 @@ jobs: uses: appleboy/scp-action@master with: username: root - host: ${{ secrets.NCP_DEV_IP }} - password: ${{ secrets.NCP_PASSWORD }} + host: ${{ secrets.AWS_DEV_IP }} + key: ${{ secrets.AWS_PASSWORD }} source: "./.env" target: "/home" @@ -57,9 +58,9 @@ jobs: - name: Send docker-compose.yml uses: appleboy/scp-action@master with: - username: root - host: ${{ secrets.NCP_DEV_IP }} - password: ${{ secrets.NCP_PASSWORD }} + username: ec2-user + host: ${{ secrets.AWS_DEV_IP }} + key: ${{ secrets.AWS_PASSWORD }} port: 22 source: "./.docker/docker-compose.yml" target: "/home" @@ -68,9 +69,9 @@ jobs: - name: Deploy uses: appleboy/ssh-action@master with: - username: root - host: ${{ secrets.NCP_DEV_IP }} - password: ${{ secrets.NCP_PASSWORD }} + username: ec2-user + host: ${{ secrets.AWS_DEV_IP }} + key: ${{ secrets.AWS_PASSWORD }} script: | cp /home/.docker/docker-compose.yml /home cd /home