diff --git a/.gitea/workflows/preview-cleanup.yml b/.gitea/workflows/preview-cleanup.yml index 20d50781b..41f1900ef 100644 --- a/.gitea/workflows/preview-cleanup.yml +++ b/.gitea/workflows/preview-cleanup.yml @@ -28,7 +28,14 @@ jobs: shell: sh run: | set -eu - apt-get update -qq && apt-get install -y -qq openssh-client >/dev/null 2>&1 + if command -v apk >/dev/null 2>&1; then + apk add --no-cache openssh-client >/dev/null 2>&1 + elif command -v apt-get >/dev/null 2>&1; then + apt-get update -qq && apt-get install -y -qq openssh-client >/dev/null 2>&1 + else + echo "ERROR: No package manager found" + exit 1 + fi echo "openssh-client installed" - name: Remove preview directory from server diff --git a/.gitea/workflows/preview-deploy.yml b/.gitea/workflows/preview-deploy.yml index b70bf45ba..28f4f5189 100644 --- a/.gitea/workflows/preview-deploy.yml +++ b/.gitea/workflows/preview-deploy.yml @@ -132,11 +132,20 @@ jobs: ls -la dist/ ' - - name: Install SSH client + - name: Install SSH client and rsync shell: sh run: | set -eu - apt-get update -qq && apt-get install -y -qq openssh-client rsync >/dev/null 2>&1 + if command -v apk >/dev/null 2>&1; then + apk add --no-cache openssh-client rsync >/dev/null 2>&1 + elif command -v apt-get >/dev/null 2>&1; then + apt-get update -qq && apt-get install -y -qq openssh-client rsync >/dev/null 2>&1 + elif command -v yum >/dev/null 2>&1; then + yum install -y openssh-clients rsync >/dev/null 2>&1 + else + echo "ERROR: No package manager found" + exit 1 + fi echo "openssh-client and rsync installed" - name: Deploy preview to server