From 43e5c6e5fa9da2645b4623e58850dde6379d72ac Mon Sep 17 00:00:00 2001 From: ctmbl Date: Fri, 3 May 2024 01:32:02 +0200 Subject: [PATCH] Modify Github Action to use the remote git pull script --- .github/workflows/build_and_deploy.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_and_deploy.yml b/.github/workflows/build_and_deploy.yml index 6e4ed21..a4f3aaf 100644 --- a/.github/workflows/build_and_deploy.yml +++ b/.github/workflows/build_and_deploy.yml @@ -44,7 +44,7 @@ jobs: # - SSH_KNOWN_HOSTS # - PRIVATE_SSH_KEY # - CI_USER_NAME - # - STATIC_WEBSITE_PATH + # - REPO_PATH_ON_REMOTE deploy: needs: [build] # DISCLAIMER: @@ -83,7 +83,11 @@ jobs: # Upload the build to the remote server location: the volume shared by the nginx container serving http requests - name: 🚀 Upload run: | - rsync --archive --stats --verbose --delete ./build/blog/* ${{ secrets.CI_USER_NAME }}@iscsc.fr:${{ secrets.STATIC_WEBSITE_PATH}} + rsync --archive --stats --verbose --delete ./build/blog/* ${{ secrets.CI_USER_NAME }}@iscsc.fr:${{ secrets.REPO_PATH_ON_REMOTE }}/build/blog + + - name: ⏬ Remote git pull + run: | + ssh ${{ secrets.CI_USER_NAME }}@iscsc.fr /usr/bin/bash ${{ secrets.REPO_PATH_ON_REMOTE }}/scripts/remote_git_pull.sh ${{ secrets.REPO_PATH_ON_REMOTE }} # Finally notify of the new article (if any) on the iScsc discord server # action jitterbit/get-changed-files@v1 doesn't support 'workflow_dispatch' events: https://github.com/jitterbit/get-changed-files/issues/38