From 4e6be8eea49a031851a595706ea629df3501ed09 Mon Sep 17 00:00:00 2001 From: Sakura Akeno Isayeki Date: Thu, 8 Feb 2024 11:26:16 +0100 Subject: [PATCH] feat(ci/deploy): Add restart API service step This commit adds a new step to the deploy workflow in `.github/workflows/deploy-preview.yml`. The new step is responsible for restarting the API service(s) after deployment. --- .github/workflows/deploy-preview.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy-preview.yml b/.github/workflows/deploy-preview.yml index e4524f2..83baceb 100644 --- a/.github/workflows/deploy-preview.yml +++ b/.github/workflows/deploy-preview.yml @@ -63,4 +63,7 @@ jobs: run: ssh-keyscan -H ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts - name: Deploy with rsync - run: rsync -rvmzOE . ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:${{ secrets.SSH_DEPLOYPATH }} \ No newline at end of file + run: rsync -rvmzOE . ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:${{ secrets.SSH_DEPLOYPATH }} + + - name: Restart API service(s) + run: ssh ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} ${{ vars.SSH_CMD_RESTART_API }} \ No newline at end of file