Skip to content

Commit

Permalink
ci : github action 코드 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
hsuush committed Jan 25, 2024
1 parent e4e646d commit e5bb6d3
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion .github/workflows/dev-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,25 @@ jobs:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
labels: ${{ steps.meta.outputs.labels }}

code-deploy:
needs: build-and-push-image
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Access to server and Run container
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SERVER_IP }}
username: ${{ secrets.SERVER_USER }}
password: ${{ secrets.SSH_PASSWORD }}
script: |
cd reviewzip-server
docker-compose down
docker-compose rm
docker rmi ${{ secrets.IMAGE_NAME }}
docker pull ${{ secrets.IMAGE_NAME }}
docker-compose up -d

0 comments on commit e5bb6d3

Please sign in to comment.