ssh,target

This commit is contained in:
Marc Beninca 2024-03-23 09:39:00 +01:00
parent a540e0316f
commit 538b1b70fb
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F
2 changed files with 11 additions and 2 deletions

11
cd-init
View file

@ -1,14 +1,23 @@
export SSH='cd@de.tilde.link'
export TARGET="${SSH}:/cd/${GITHUB_REF_NAME}/${GITHUB_REPOSITORY}"
# packages
apt-get install --yes \ apt-get install --yes \
'rsync' \ 'rsync' \
'tree' \ 'tree' \
# ssh
mkdir --parents ~/.ssh mkdir --parents ~/.ssh
echo "${CD}" > ~/.ssh/id_ed25519 echo "${CD}" > ~/.ssh/id_ed25519
unset CD unset CD
chmod 400 ~/.ssh/id_ed25519 chmod 400 ~/.ssh/id_ed25519
ssh \ ssh \
-o StrictHostKeyChecking=accept-new \ -o StrictHostKeyChecking=accept-new \
'cd@de.tilde.link' \ "${SSH}" \
-- \ -- \
hostname hostname

View file

@ -3,4 +3,4 @@ rsync \
--delete-before \ --delete-before \
--verbose \ --verbose \
'out/' \ 'out/' \
"cd@de.tilde.link:/cd/${GITHUB_REF_NAME}/${GITHUB_REPOSITORY}/" "${TARGET}/"