Skip to content

Commit d3f12e2

Browse files
authored
Update django.yml
1 parent 98814b2 commit d3f12e2

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

.github/workflows/django.yml

+11-5
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,20 @@ jobs:
1313
steps:
1414
- name: Configure SSH
1515
run: |
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
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/staging.key
24+
StrictHostKeyChecking no
25+
END
2026
env:
2127
SSH_USER: ${{ secrets.SSH_USER }}
2228
SSH_KEY: ${{ secrets.SSH_KEY }}
2329
SSH_HOST: ${{ secrets.SSH_HOST }}
2430
- name: Deploy to Server
2531
run: |
26-
ssh [email protected] 'cd /home/django/bakeup/'
32+
ssh production 'cd /home/django/bakeup/'

0 commit comments

Comments
 (0)