mirror of
https://github.com/Xtao-Labs/QQ-GitHub-Bot.git
synced 2025-01-30 15:08:54 +00:00
46 lines
1.1 KiB
YAML
46 lines
1.1 KiB
YAML
name: Deploy
|
|
|
|
on:
|
|
workflow_run:
|
|
workflows:
|
|
- "Release"
|
|
types:
|
|
- completed
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
|
steps:
|
|
- name: start deployment
|
|
uses: bobheadxi/deployments@v0.6
|
|
id: deployment
|
|
with:
|
|
step: start
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
env: official-bot
|
|
|
|
- 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 down
|
|
docker-compose pull
|
|
docker-compose up -d
|
|
|
|
- name: update deployment status
|
|
uses: bobheadxi/deployments@v0.6
|
|
if: always()
|
|
with:
|
|
step: finish
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
status: ${{ job.status }}
|
|
deployment_id: ${{ steps.deployment.outputs.deployment_id }}
|