Skip to content

Commit

Permalink
action : cd 코드 작성
Browse files Browse the repository at this point in the history
  • Loading branch information
Astin01 authored Apr 30, 2024
1 parent 4e32b92 commit b7499f8
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,18 @@ jobs:

- name: docker Hub push
run: docker push ${{ secrets.DOCKER_HUB_USERNAME }}/zero-plate-api

- name: Deploy to prod
uses: appleboy/ssh-action@master
id: deploy-prod
if: contains(github.ref, 'main')
with:
host: ${{ secrets.HOST_PROD }}
username: ubuntu
key: ${{ secrets.PRIVATE_KEY }}
envs: GITHUB_SHA
script: |
sudo docker ps
sudo docker pull ${{ secrets.DOCKER_HUB_USERNAME }}/zero-plate-api
sudo docker run -d -p 8080:8080 ${{ secrets.DOCKER_HUB_USERNAME }}/zero-plate-api
sudo docker image prune -f

0 comments on commit b7499f8

Please sign in to comment.