diff --git a/.github/workflows/dev-aws-CI-CD.yml b/.github/workflows/dev-aws-CI-CD.yml index acabdc8..fa284b3 100644 --- a/.github/workflows/dev-aws-CI-CD.yml +++ b/.github/workflows/dev-aws-CI-CD.yml @@ -75,23 +75,26 @@ jobs: - name: Show docker-compose.yml Content run: cat docker-compose.yml # docker-compose.yml 파일 내용 확인 - - name: Send docker-compose.yml + # Send nginx.conf to a temporary location + - name: Send nginx.conf to Home Directory uses: appleboy/scp-action@master with: username: ubuntu host: ${{ secrets.AWS_DEV_HOSTNAME }} key: ${{ secrets.AWS_DEV_PRIVATE_KEY }} - source: "./docker-compose.yml" + source: "./nginx/conf.d/nginx.conf" target: "/home/ubuntu/" - - name: Send nginx.conf - uses: appleboy/scp-action@master + # Move nginx.conf from Home Directory to /etc/nginx/conf.d + - name: Move nginx.conf to /etc/nginx/conf.d + uses: appleboy/ssh-action@master with: username: ubuntu host: ${{ secrets.AWS_DEV_HOSTNAME }} key: ${{ secrets.AWS_DEV_PRIVATE_KEY }} - source: "./nginx/conf.d/nginx.conf" - target: "/etc/nginx/conf.d/" + script: | + sudo mkdir -p /etc/nginx/conf.d/ + sudo mv /home/ubuntu/nginx.conf /etc/nginx/conf.d/nginx.conf ## Docker login - name: Docker Login