From 97f2dd8d643b5e336f74ee9e2dab17cd8ccc4658 Mon Sep 17 00:00:00 2001 From: Lukas Oertel Date: Mon, 9 Sep 2024 00:03:48 +0200 Subject: [PATCH] Use custom SSH port for Github Actions --- .github/scripts/deploy.sh | 3 ++- .github/workflows/main.yml | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/scripts/deploy.sh b/.github/scripts/deploy.sh index 53c57d7..0e936be 100755 --- a/.github/scripts/deploy.sh +++ b/.github/scripts/deploy.sh @@ -7,6 +7,7 @@ umask 0077 SFTP_USER="anfibrief-cd" HOST="teri.fsi.uni-tuebingen.de" +PORT="${SSH_PORT}" TARGET_DIRECTORY="www" KNOWN_HOSTS=" dGVyaS5mc2kudW5pLXR1ZWJpbmdlbi5kZSBzc2gtcnNhIEFBQUFCM056YUMxeWMyRUFBQUFEQVFB\ @@ -30,5 +31,5 @@ put anfibrief/.BUILDINFO chmod 644 * EOF -sftp -i /tmp/id_rsa -b sftp-commands "${SFTP_USER}@${HOST}:${TARGET_DIRECTORY}" +sftp -i /tmp/id_rsa -P "${PORT}" -b sftp-commands "${SFTP_USER}@${HOST}:${TARGET_DIRECTORY}" rm /tmp/id_rsa diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 24f2aa2..25db9c2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -26,4 +26,5 @@ jobs: if: ${{ github.repository_owner == 'fsi-tue' && github.ref == 'refs/heads/master' }} env: SSH_KEY: ${{ secrets.SSH_KEY }} + SSH_PORT: ${{ secrets.SSH_PORT }} run: .github/scripts/deploy.sh