Skip to content

fix auto deploy

fix auto deploy #8

Workflow file for this run

name: Deploy
on:
workflow_run:
workflows: ["Build and Push to Docker Hub"]
types:
- completed
jobs:
run_pull:
name: run pull
runs-on: ubuntu-latest
steps:
- name: install ssh keys
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
run: cd ${{ secrets.WORK_DIR }} && docker-compose stop && docker rm $(docker ps -aq) && docker rmi $(docker image ls -q) && docker-compose pull && docker-compose up -d && exit
- name: cleanup
run: rm -rf ~/.ssh