Skip to content

Commit

Permalink
Chore(#2): ci-cd setting
Browse files Browse the repository at this point in the history
  • Loading branch information
versatile0010 committed Sep 30, 2023
1 parent 0e1b0c4 commit c54136c
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

0 comments on commit c54136c

Please sign in to comment.