Skip to content

update: make docker autostart & forece recreate on deploy #87

update: make docker autostart & forece recreate on deploy

update: make docker autostart & forece recreate on deploy #87

Workflow file for this run

name: Deploy
on:
workflow_dispatch:
# workflow_run:
# workflows: ["Test"]
# types:
# - completed
pull_request:
types:
- closed
jobs:
deploy:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- name: Cloning repo
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Deploy to vps
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USERNAME }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
port: 22
command_timeout: 30m
script: |
cd image-optimizer
git pull origin master
docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d --no-deps --build --force-recreate