Skip to content

Commit

Permalink
fix : create seceret
Browse files Browse the repository at this point in the history
  • Loading branch information
sycuuui committed Mar 21, 2024
1 parent 0510d64 commit 8c38032
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/github-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ jobs:
- name: Docker build & push
if: github.ref == 'refs/heads/main' # 메인 브랜치에 푸시했을 때만 실행
run: |
docker build -t capic/capic .
docker push capic/capic
docker login -u ${{ secrets.DOCKERHUB_USERNAME }} -p ${{ secrets.DOCKERHUB_PASSWORD }}
docker build -t ${{ secrets.DOCKERHUB_USERNAME}}/${{ secrets.DOCKERHUB_REPOSITORY}} ./
docker push ${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.DOCKERHUB_REPOSITORY}}
# EC2로 배포
- name: Deploy to EC2
if: github.ref == 'refs/heads/main' # 메인 브랜치에 푸시했을 때만 실행
Expand All @@ -50,5 +50,5 @@ jobs:
username: ubuntu
key: ${{ secrets.PRIVATE_KEY }}
script: |
sudo docker pull ${{ secrets.DOCKER_NAME }}/capic
sudo docker run -d -p 5000:5000 ${{ secrets.DOCKER_NAME }}/capic
sudo docker pull ${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.DOCKERHUB_REPOSITORY}}
sudo docker run -d -p 5000:5000 ${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.DOCKERHUB_REPOSITORY}}

0 comments on commit 8c38032

Please sign in to comment.