Skip to content

everyteen-be-app CD

everyteen-be-app CD #3

Workflow file for this run

name: everyteen-be-app CD
on:
workflow_run:
workflows:
- everyteen-be-app CI
types:
- completed
env:
REGISTRY: docker.io
IMAGE_NAME: be-everyteen-app
jobs:
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