Skip to content

Commit

Permalink
Merge pull request #159 from twenty-three-23/feature/TT-208-ci-cd
Browse files Browse the repository at this point in the history
fix: cicd
  • Loading branch information
snacktime81 authored Jul 8, 2024
2 parents 374b4ed + e89eae5 commit d5f3ebd
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions .github/workflows/cicd_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,19 +75,19 @@ jobs:
needs: build-docker-image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3

# 개발 서버 ec2 ssh 접속
- name: excute ec2 ssh
uses: appleboy/[email protected]
with:
key : ${{ secrets.DEV_EC2_KEY }}
host: ${{ secrets.DEV_EC2_IP }}
username: ${{ secrets.DEV_EC2_ID }}
port: ${{ secrets.DEV_EC2_PORT }}
script: |
sudo docker pull ${{ secrets.DOCKERHUB_USERNAME }}/github-actions-demo
sudo docker stop $(sudo docker ps -q) 2>/dev/null || true
sudo docker run --name github-actions-demo --rm -d -p 8080:8080 ${{ secrets.DOCKERHUB_USERNAME }}/github-actions-demo
sudo docker system prune -f
# 개발 서버 ec2 ssh 접속
- name: excute ec2 ssh
uses: appleboy/[email protected]
with:
key : ${{ secrets.DEV_EC2_KEY }}
host: ${{ secrets.DEV_EC2_IP }}
username: ${{ secrets.DEV_EC2_ID }}
port: ${{ secrets.DEV_EC2_PORT }}
script: |
sudo docker pull ${{ secrets.DOCKERHUB_USERNAME }}/github-actions-demo
sudo docker stop $(sudo docker ps -q) 2>/dev/null || true
sudo docker run --name github-actions-demo --rm -d -p 8080:8080 ${{ secrets.DOCKERHUB_USERNAME }}/github-actions-demo
sudo docker system prune -f

0 comments on commit d5f3ebd

Please sign in to comment.