We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 98814b2 commit d3f12e2Copy full SHA for d3f12e2
.github/workflows/django.yml
@@ -13,14 +13,20 @@ jobs:
13
steps:
14
- name: Configure SSH
15
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
+ mkdir -p ~/.ssh/
+ echo "$SSH_KEY" > ~/.ssh/production.key
+ chmod 600 ~/.ssh/production.key
+ 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
26
env:
27
SSH_USER: ${{ secrets.SSH_USER }}
28
SSH_KEY: ${{ secrets.SSH_KEY }}
29
SSH_HOST: ${{ secrets.SSH_HOST }}
30
- name: Deploy to Server
31
- ssh [email protected] 'cd /home/django/bakeup/'
32
+ ssh production 'cd /home/django/bakeup/'
0 commit comments