Skip to content

Commit

Permalink
Exit with error code when SSH_ secrets not set (see #23)
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbrightwell committed Feb 28, 2022
1 parent bc74dfa commit 96aade8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions upload-site.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ set -o errexit

# The $SSH_ env variables are provided by GitHub secret


[[ -z "$SSH_USER" ]] && echo "SSH_USER not set" && exit 1
[[ -z "$SSH_HOST" ]] && echo "SSH_HOST not set" && exit 1
[[ -z "$SSH_PRIVATE_KEY" ]] && echo "SSH_PRIVATE_KEY not set" && exit 1
[[ -z "$SSH_KNOWN_HOSTS" ]] && echo "SSH_KNOWN_HOSTS not set" && exit 1

dest="/var/www/$SPEC_SERVER/$SITE_NAME"

if [[ -e .ssh ]]; then
Expand Down

0 comments on commit 96aade8

Please sign in to comment.