Skip to content

Commit

Permalink
Update django.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
bruecksen authored May 31, 2024
1 parent 98814b2 commit d3f12e2
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/django.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,20 @@ jobs:
steps:
- name: Configure SSH
run: |
mkdir -p ~/.ssh
echo "${{ secrets.SSH_KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
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
Host production
HostName $SSH_HOST
User $SSH_USER
IdentityFile ~/.ssh/staging.key
StrictHostKeyChecking no
END
env:
SSH_USER: ${{ secrets.SSH_USER }}
SSH_KEY: ${{ secrets.SSH_KEY }}
SSH_HOST: ${{ secrets.SSH_HOST }}
- name: Deploy to Server
run: |
ssh [email protected] 'cd /home/django/bakeup/'
ssh production 'cd /home/django/bakeup/'

0 comments on commit d3f12e2

Please sign in to comment.