Skip to content

Commit

Permalink
fix(deploy): validate private key not empty
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabián Vega authored and Fabián Vega committed Mar 24, 2024
1 parent 6b147bd commit bb68838
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ jobs:
HOST: ${{ secrets.EC2_HOST }}
USER: ${{ secrets.EC2_USER }}
run: |
if [ -z "$PRIVATE_KEY" ]; then
echo "The private key is not set"
exit 1
fi
echo "$PRIVATE_KEY" > private_key.pem
chmod 600 private_key.pem
rsync -avzr -vvv --delete --exclude '.git/' --exclude '.github/' -e "ssh -i private_key.pem -o StrictHostKeyChecking=no" ./dist/ $USER@$HOST:~/dist
Expand Down

0 comments on commit bb68838

Please sign in to comment.