Skip to content

Commit 98814b2

Browse files
authored
next try
1 parent 87b693e commit 98814b2

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

.github/workflows/django.yml

+5-11
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,14 @@ jobs:
1313
steps:
1414
- name: Configure SSH
1515
run: |
16-
mkdir -p ~/.ssh/
17-
echo "$SSH_KEY" > ~/.ssh/production.key
18-
chmod 600 ~/.ssh/production.key
19-
cat >>~/.ssh/config <<END
20-
Host production
21-
HostName $SSH_HOST
22-
User $SSH_USER
23-
IdentityFile ~/.ssh/production.key
24-
StrictHostKeyChecking no
25-
END
16+
mkdir -p ~/.ssh
17+
echo "${{ secrets.SSH_KEY }}" > ~/.ssh/id_rsa
18+
chmod 600 ~/.ssh/id_rsa
19+
ssh-keyscan bakeup.org >> ~/.ssh/known_hosts
2620
env:
2721
SSH_USER: ${{ secrets.SSH_USER }}
2822
SSH_KEY: ${{ secrets.SSH_KEY }}
2923
SSH_HOST: ${{ secrets.SSH_HOST }}
3024
- name: Deploy to Server
3125
run: |
32-
ssh production 'cd /home/django/bakeup/'
26+
ssh [email protected] 'cd /home/django/bakeup/'

0 commit comments

Comments
 (0)