CD stag client api #3
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
name: CD stag client api | |
on: workflow_dispatch | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: api-deploy | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.HOST }} | |
username: ubuntu | |
key: ${{ secrets.KEY }} | |
script: | | |
sudo docker rm -f ${{ secrets.DOCKER_CLIENT_API_STAG_CONTAINER }} | |
sudo docker rmi ${{ secrets.DOCKER_CLIENT_API_STAG_IMAGE }} | |
docker-compose -f ${{ secrets.DOCKER_COMPOSE_DIRECTORY }} up -d | |
docker image prune -f |