Skip to content

Commit

Permalink
Don't store the private SSH key on disc
Browse files Browse the repository at this point in the history
  • Loading branch information
kafeman committed Dec 16, 2023
1 parent 5b26dfc commit 446fd42
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/beta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,11 @@ jobs:
- name: Deploy to ${{ env.DOMAIN }}
run: |
mkdir ~/.ssh
echo "${{vars.SSH_KNOWN_HOSTS}}" > ~/.ssh/known_hosts
echo "${{ vars.SSH_KNOWN_HOSTS }}" > ~/.ssh/known_hosts
eval `ssh-agent`
echo "${{secrets.SSH_PRIVATE_KEY}}" | ssh-add -
echo "$SSH_PRIVATE_KEY" | ssh-add -
rsync --recursive --verbose dist/ [email protected]:/var/www/${{ env.DOMAIN }}
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Check if the URL is accessible
run: curl --fail https://${{ env.DOMAIN }}

0 comments on commit 446fd42

Please sign in to comment.