👷 add deploy cd

This commit is contained in:
yanyongyu 2021-09-11 22:13:00 +08:00
parent c7e4624b52
commit 73ceaa233f

25
.github/workflows/deploy.yml vendored Normal file
View File

@ -0,0 +1,25 @@
name: Deploy
on:
workflow_run:
workflows:
- "Release"
types:
- completed
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: remote ssh command
uses: appleboy/ssh-action@master
env:
DEPLOY_PATH: ${{ secrets.DEPLOY_PATH }}
with:
host: ${{ secrets.DEPLOY_HOST }}
username: ${{ secrets.DEPLOY_USER }}
key: ${{ secrets.DEPLOY_KEY }}
envs: DEPLOY_PATH
script: |
cd $DEPLOY_PATH
docker-compose up --force-recreate -d