Skip to content

Commit

Permalink
Use custom SSH port for Github Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
luoe committed Sep 8, 2024
1 parent 0de26bc commit 2e6c3e9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/scripts/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ umask 0077

SFTP_USER="anfipraesentation-cd"
HOST="teri.fsi.uni-tuebingen.de"
PORT="${SSH_PORT}"
TARGET_DIRECTORY="www"
KNOWN_HOSTS="
dGVyaS5mc2kudW5pLXR1ZWJpbmdlbi5kZSBzc2gtcnNhIEFBQUFCM056YUMxeWMyRUFBQUFEQVFB\
Expand All @@ -29,5 +30,5 @@ put anfipraesentation/*
put anfipraesentation/.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
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 2e6c3e9

Please sign in to comment.