workflow: stop doing ipv6 hack

Signed-off-by: Naman Sood <mail@nsood.in>
This commit is contained in:
Naman Sood 2023-07-02 13:25:01 -04:00
parent c4938431be
commit 961889747b

View file

@ -26,8 +26,7 @@ jobs:
SSH_KEY: ${{ secrets.SSH_KEY }} SSH_KEY: ${{ secrets.SSH_KEY }}
run: | run: |
mkdir -p ~/.ssh mkdir -p ~/.ssh
MACHINE_IP="$(tailscale ip -6 $MACHINE)" ssh-keyscan $MACHINE >> ~/.ssh/known_hosts
ssh-keyscan $MACHINE_IP >> ~/.ssh/known_hosts
printf "%s" "$SSH_KEY" > ~/.ssh/key printf "%s" "$SSH_KEY" > ~/.ssh/key
chmod 600 ~/.ssh/key chmod 600 ~/.ssh/key
@ -46,8 +45,7 @@ jobs:
FILENAME=prose-${TIME}.tar.gz FILENAME=prose-${TIME}.tar.gz
mkdir -p static/css mkdir -p static/css
tar -czf $FILENAME prose fonts/ static/ styles/ templates/ posts/ tar -czf $FILENAME prose fonts/ static/ styles/ templates/ posts/
MACHINE_IP="$(tailscale ip -6 $MACHINE)" echo $FILENAME "github@$MACHINE:/home/github/"
echo $FILENAME "github@[$MACHINE_IP]:/home/github/" scp -i ~/.ssh/key $FILENAME "github@$MACHINE:/home/github/"
scp -i ~/.ssh/key $FILENAME "github@[$MACHINE_IP]:/home/github/" ssh -i ~/.ssh/key "github@$MACHINE" "tar -C /var/www/blog -xzf ~/$FILENAME"
ssh -i ~/.ssh/key "github@$MACHINE_IP" "tar -C /var/www/blog -xzf ~/$FILENAME" ssh -i ~/.ssh/key "github@$MACHINE" "sudo systemctl restart prose"
ssh -i ~/.ssh/key "github@$MACHINE_IP" "sudo systemctl restart prose"