need to add newline to end of private key file
Some checks failed
/ Deploy website to server (push) Failing after 14s
Some checks failed
/ Deploy website to server (push) Failing after 14s
This commit is contained in:
7
.github/workflows/deploy.yml
vendored
7
.github/workflows/deploy.yml
vendored
@@ -20,12 +20,15 @@ jobs:
|
||||
tags: tag:ci
|
||||
- name: Add SSH key
|
||||
env:
|
||||
SSH_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
run: |
|
||||
mkdir -p ~/.ssh
|
||||
MACHINE_IP="$(tailscale ip -4 $MACHINE)"
|
||||
ssh-keyscan $MACHINE_IP >> ~/.ssh/known_hosts
|
||||
printf "%s" "$SSH_KEY" > ~/.ssh/key
|
||||
printf "%s" "$SSH_PRIVATE_KEY" > ~/.ssh/key
|
||||
# add a new line to the end of the private key file
|
||||
# otherwise it won't be loaded properly
|
||||
echo >> ~/.ssh/key
|
||||
chmod 600 ~/.ssh/key
|
||||
- name: Deploy website
|
||||
run: |
|
||||
|
Reference in New Issue
Block a user