Skip to content

Commit

Permalink
fix: deploy workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ga-devfront committed Mar 22, 2024
1 parent 473035d commit e15bcc4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,11 @@ jobs:
- name: Deploy to VPS
env:
SSH_PRIVATE_KEY: ${{ secrets.VPS_SSH_KEY }}
SSH_KEY_PATH: ${{ github.workspace }}/../private.key
shell: bash
run: |
scp -o StrictHostKeyChecking=no -i <(echo "$SSH_PRIVATE_KEY") ssh_key -r dist/* ${{ secrets.VPS_USERNAME }}@${{ secrets.VPS_HOST }}:${{ secrets.VPS_PROJECT_FOLDER }}
mkdir -p ~/.ssh/
echo "$SSH_PRIVATE_KEY" > ../private.key
sudo chmod 600 ../private.key
ssh-keyscan -H ${{secrets.VPS_HOST}} > ~/.ssh/known_hosts
scp -i $SSH_KEY_PATH -r dist/* ${{ secrets.VPS_USERNAME }}@${{ secrets.VPS_HOST }}:${{ secrets.VPS_PROJECT_FOLDER }}

0 comments on commit e15bcc4

Please sign in to comment.