Skip to content

Commit

Permalink
feat : 무지성 푸쉬
Browse files Browse the repository at this point in the history
  • Loading branch information
Doncham committed Mar 11, 2024
1 parent 0506e2c commit fb0c520
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/githubAction.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,22 +41,26 @@ jobs:
- name: Build with Gradle 8.5
run: ./gradlew bootJar
working-directory: ./backend/shareNote

# dockerfile을 통해 이미지를 빌드하고, 이를 docker repo로 push 합니다.
# 이 때 사용되는 ${{ secrets.DOCKER_REPO }}/directors-dev 는 docker-hub에서 만든 것

- name: Docker build backend & push to docker repo
run: |
docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}
docker build -f backend/shareNote/dockerfile -t ${{ secrets.DOCKER_REPO }}:backend .
docker build -f ./backend/shareNote/dockerfile --platform linux/amd64 -t ${{ secrets.DOCKER_REPO }}:backend ./backend/shareNote
docker push ${{ secrets.DOCKER_REPO }}:backend
- name: Docker build frontend & push to docker repo
run: |
docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}
docker build -f frontend/dockerfile -t ${{ secrets.DOCKER_REPO }}:frontend .
docker build -f ./frontend/dockerfile --platform linux/amd64 -t ${{ secrets.DOCKER_REPO }}:frontend .
docker push ${{ secrets.DOCKER_REPO }}:frontend
# appleboy/ssh-action@master 액션을 사용하여 지정한 서버에 ssh로 접속하고, script를 실행합니다.
# script의 내용은 도커의 기존 프로세스들을 제거하고, docker repo로부터 방금 위에서 push한 내용을 pull 받아 실행하는 것입니다.
# 실행 시, docker-compose를 사용합니다.

- name: Deploy to server
uses: appleboy/ssh-action@master
id: deploy
Expand Down

0 comments on commit fb0c520

Please sign in to comment.