long live tailscale ssh
Some checks failed
/ Deploy blog to deuterium (push) Failing after 1m13s

Signed-off-by: Naman Sood <mail@nsood.in>
This commit is contained in:
Naman Sood 2024-11-21 21:41:19 -05:00
parent 608097e431
commit 8735b45121

View file

@ -34,15 +34,6 @@ jobs:
if: failure()
run: |
cat ~/tailscaled.log
- name: Add SSH key
id: ssh
env:
SSH_KEY: ${{ secrets.SSH_KEY }}
run: |
mkdir -p ~/.ssh
ssh-keyscan $MACHINE > ~/.ssh/known_hosts
printf "%s" "$SSH_KEY" > ~/.ssh/key
chmod 600 ~/.ssh/key
- name: Fetch code
id: fetch
@ -60,6 +51,7 @@ jobs:
mkdir -p static/css
tar -czf $FILENAME prose static/ styles/ templates/ posts/
echo $FILENAME "www@$MACHINE:/home/www/"
scp -i ~/.ssh/key $FILENAME "www@$MACHINE:/home/www/"
ssh -i ~/.ssh/key "www@$MACHINE" "tar -C /var/www/prose.nsood.in -xzf ~/$FILENAME"
ssh -i ~/.ssh/key "www@$MACHINE" "sudo systemctl restart prose"
ssh-keyscan $MACHINE
scp $FILENAME "www@$MACHINE:/home/www/"
ssh "www@$MACHINE" "tar -C /var/www/prose.nsood.in -xzf ~/$FILENAME"
ssh "www@$MACHINE" "sudo systemctl restart prose"