Skip to content

Commit a683285

Browse files
committed
need to add newline to end of private key file
1 parent c3d884a commit a683285

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,15 @@ jobs:
2020
tags: tag:ci
2121
- name: Add SSH key
2222
env:
23-
SSH_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
23+
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
2424
run: |
2525
mkdir -p ~/.ssh
2626
MACHINE_IP="$(tailscale ip -4 $MACHINE)"
2727
ssh-keyscan $MACHINE_IP >> ~/.ssh/known_hosts
28-
printf "%s" "$SSH_KEY" > ~/.ssh/key
28+
printf "%s" "$SSH_PRIVATE_KEY" > ~/.ssh/key
29+
# add a new line to the end of the private key file
30+
# otherwise it won't be loaded properly
31+
echo >> ~/.ssh/key
2932
chmod 600 ~/.ssh/key
3033
- name: Deploy website
3134
run: |

0 commit comments

Comments
 (0)