This commit is contained in:
4
.github/workflows/deploy.yml
vendored
4
.github/workflows/deploy.yml
vendored
@@ -23,7 +23,7 @@ jobs:
|
|||||||
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
|
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||||
run: |
|
run: |
|
||||||
mkdir -p ~/.ssh
|
mkdir -p ~/.ssh
|
||||||
MACHINE_IP="$(tailscale ip -4 $MACHINE)"
|
MACHINE_IP="$(tailscale ip -4 $MACHINE_NAME)"
|
||||||
ssh-keyscan $MACHINE_IP >> ~/.ssh/known_hosts
|
ssh-keyscan $MACHINE_IP >> ~/.ssh/known_hosts
|
||||||
printf "%s" "$SSH_PRIVATE_KEY" > ~/.ssh/key
|
printf "%s" "$SSH_PRIVATE_KEY" > ~/.ssh/key
|
||||||
# add a new line to the end of the private key file
|
# add a new line to the end of the private key file
|
||||||
@@ -32,7 +32,7 @@ jobs:
|
|||||||
chmod 600 ~/.ssh/key
|
chmod 600 ~/.ssh/key
|
||||||
- name: Deploy website
|
- name: Deploy website
|
||||||
run: |
|
run: |
|
||||||
MACHINE_IP="$(tailscale ip -4 $MACHINE)"
|
MACHINE_IP="$(tailscale ip -4 $MACHINE_NAME)"
|
||||||
ssh -i ~/.ssh/key "kenneth@$MACHINE_IP" /bin/bash << EOF
|
ssh -i ~/.ssh/key "kenneth@$MACHINE_IP" /bin/bash << EOF
|
||||||
cd /opt/website
|
cd /opt/website
|
||||||
git pull
|
git pull
|
||||||
|
Reference in New Issue
Block a user