-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
⬆️ everyteen-ci-cd.yml 으로 이름 및 내용 변경
CI 와 CD 워크플로우 합침
- Loading branch information
1 parent
1689aa6
commit 25bb560
Showing
1 changed file
with
22 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: everyteen-be-app CI | ||
name: everyteen-be-app CI/CD | ||
|
||
on: | ||
push: | ||
|
@@ -39,3 +39,24 @@ jobs: | |
context: . | ||
push: true | ||
tags: ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:latest | ||
|
||
deploy: | ||
runs-on: ubuntu-latest | ||
environment: dev | ||
|
||
steps: | ||
- name: 🔑 executing remote ssh && deploy with docker-compose | ||
uses: appleboy/[email protected] | ||
with: | ||
host: ${{ secrets.HOST_NAME }} | ||
username: ubuntu | ||
key: ${{ secrets.SSH_PRIVATE_KEY }} | ||
port: ${{ secrets.SSH_PORT }} | ||
script: | | ||
docker pull ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:latest | ||
cd ${{ secrets.DOCKER_COMPOSE_PATH }} | ||
docker-compose down | ||
docker-compose up -d | ||
docker image prune -f | ||
docker ps -a | ||