Skip to content

gateway-service prod CD 파이프라인 #6

gateway-service prod CD 파이프라인

gateway-service prod CD 파이프라인 #6

Workflow file for this run

name: gateway-service prod CD 파이프라인
on:
workflow_run:
workflows: ["gateway-service CI pipeline"]
types:
- completed
jobs:
deploy:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
environment: prod
permissions:
contents: read
steps:
- name: Docker 이미지 dev 서버 배포
uses: appleboy/ssh-action@master
with:
host: ${{secrets.PROD_HOST}}
username: ${{secrets.PROD_USERNAME}}
key: ${{secrets.PROD_KEY}}
script: |
cd /home/ubuntu
docker rm -f gateway-service-prod || true
docker compose pull gateway-service-prod
docker compose up -d --no-deps --force-recreate --pull always gateway-service-prod
docker image prune -f