Skip to content

Commit a89ba51

Browse files
Uriel AlonsoUriel Alonso
authored andcommitted
Refresh SSH host key in deploy workflow
1 parent 9674165 commit a89ba51

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

.github/workflows/deploy.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,12 @@ jobs:
6666
password: ${{ secrets.GHCR_TOKEN }}
6767

6868
- name: Set up SSH key
69-
run: |
70-
mkdir -p ~/.ssh
71-
echo "${{ secrets.LIGHTSAIL_SSH_KEY }}" > ~/.ssh/lightsail_key
72-
chmod 600 ~/.ssh/lightsail_key
73-
ssh-keyscan -H ${{ vars.LIGHTSAIL_HOST }} >> ~/.ssh/known_hosts
69+
run: |
70+
mkdir -p ~/.ssh
71+
echo "${{ secrets.LIGHTSAIL_SSH_KEY }}" > ~/.ssh/lightsail_key
72+
chmod 600 ~/.ssh/lightsail_key
73+
ssh-keygen -R "${{ vars.LIGHTSAIL_HOST }}" || true
74+
ssh-keyscan -H "${{ vars.LIGHTSAIL_HOST }}" >> ~/.ssh/known_hosts
7475
7576
- name: Start ssh-agent
7677
run: |

0 commit comments

Comments
 (0)