Skip to content

Commit

Permalink
Provide private key properly before rsync command
Browse files Browse the repository at this point in the history
  • Loading branch information
thecodeholic committed Dec 22, 2023
1 parent d9005cb commit 6d8f314
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/hostinger-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,13 @@ jobs:
git pull
php composer.phar install
php artisan migrate --force
- name: Install SSH key
run: |
mkdir -p ~/.ssh/
echo "${{ secrets.SSH_KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan -t rsa -p ${{ secrets.SSH_PORT }} ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts
- name: Copy Build Files to Target Server
run: |
rsync -r -e "ssh -p ${{ secrets.SSH_PORT }}" ${{ github.workspace }}/public/build/ ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }}:~/domains/laravel-space.com/public/build
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_KEY }}

0 comments on commit 6d8f314

Please sign in to comment.