From 73ceaa233f78aaed2533729cad576388d8c916c8 Mon Sep 17 00:00:00 2001 From: yanyongyu Date: Sat, 11 Sep 2021 22:13:00 +0800 Subject: [PATCH] :construction_worker: add deploy cd --- .github/workflows/deploy.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..d6f6bd2 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -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