From d6323b36c2a78791bcf8d2f70e4ff15debf015b8 Mon Sep 17 00:00:00 2001 From: Matthieu Bessat Date: Mon, 23 Dec 2024 00:13:23 +0100 Subject: [PATCH] test forgejo action bash --- .forgejo/workflows/hugo.yaml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.forgejo/workflows/hugo.yaml b/.forgejo/workflows/hugo.yaml index 4b699d6..33ac1c4 100644 --- a/.forgejo/workflows/hugo.yaml +++ b/.forgejo/workflows/hugo.yaml @@ -62,8 +62,14 @@ jobs: REMOTE_USER: forgejo_actions_websites SRV_HOST: srv06.lefuturiste.fr run: | - rsync --perms --archive --stats \ - -e 'ssh -i ~/.ssh/id_edsa -o StrictHostKeyChecking=no' ./public \ - $REMOTE_USER@$SRV_HOST:$OUTPUT_PATH$GITHUB_REF_NAME + if [ "${{ env.github_ref_name }}" = "master" ] || [ "${{ env.github_ref_name }}" = "develop" ] + then + echo "Deploying to $REMOTE_USER@$SRV_HOST:$OUTPUT_PATH$GITHUB_REF_NAME" + rsync --perms --archive --stats \ + -e 'ssh -i ~/.ssh/id_edsa -o StrictHostKeyChecking=no' ./public \ + $REMOTE_USER@$SRV_HOST:$OUTPUT_PATH$GITHUB_REF_NAME + else + echo "Deployment skipped." + fi