From c54136ca7cb1614f42ff0626a3e4ec59e65fc044 Mon Sep 17 00:00:00 2001 From: versatile0010 Date: Sun, 1 Oct 2023 00:28:23 +0900 Subject: [PATCH] Chore(#2): ci-cd setting --- .github/workflows/cicd.yml | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 61cf38ed..9d22555a 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -60,16 +60,6 @@ jobs: docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }} docker build -f Dockerfile -t ${{ secrets.DOCKER_USERNAME }}/${{ secrets.DOCKER_IMAGE }} . docker push ${{ secrets.DOCKER_USERNAME }}/${{ secrets.DOCKER_IMAGE }} - - - name: ๐Ÿง docker-compose.yml ํŒŒ์ผ์„ EC2 server๋กœ ์ „๋‹ฌํ•ฉ๋‹ˆ๋‹ค. - uses: appleboy/scp-action@master - with: - username: ubuntu - host: ${{ secrets.EC2_HOST }} - key: ${{ secrets.EC2_PRIVATE_KEY }} - port: ${{ secrets.AWS_PORT }} - source: "./docker-compose.yml" - target: "/home/ubuntu/" ## deploy to production @@ -85,5 +75,5 @@ jobs: script: | sudo docker rm -f $(docker ps -qa) sudo docker pull ${{ secrets.DOCKER_USERNAME }}/${{ secrets.DOCKER_IMAGE }} - docker-compose up -d + sudo docker-compose -f /home/ubuntu/srv/ubuntu/docker-compose.yml up --build -d docker image prune -f \ No newline at end of file