Skip to content

CD

CD #7

Workflow file for this run

name: CD
on:
workflow_run:
workflows:
- CI
types:
- completed
jobs:
cd:
runs-on: sg
if: github.event.workflow_run.conclusion == 'success'
steps:
- name: Download Artifct
uses: dawidd6/action-download-artifact@v2
with:
workflow: CI
workflow_conclusion: success
run_id: ${{ github.event.workflow_run.id }}
run_number: ${{ github.event.workflow_run.run_number }}
name: sub_account
- name: Stop Service
run: ssh root@backendtest 'supervisorctl stop sub_svr'
- name: Rsync
run: rsync -a sub_account root@backendtest:/mnt/das/server/sub-account-svr/sub_account
- name: Restart Service
run: ssh root@backendtest 'chmod +x /mnt/das/server/sub-account-svr/sub_account && supervisorctl start sub_svr'