Signed-off-by: Naman Sood <mail@nsood.in>
This commit is contained in:
parent
608097e431
commit
c91fc4dfd5
1 changed files with 4 additions and 12 deletions
|
@ -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 >> ~/.ssh/known_hosts
|
||||
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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue