Skip to content

Commit

Permalink
CI: Fix: pushing to production
Browse files Browse the repository at this point in the history
  • Loading branch information
Shaikh-Ubaid committed Aug 22, 2022
1 parent e881b20 commit 9d318dc
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions ci/upload_site.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,12 @@ git add .
COMMIT_MESSAGE="Deploying on $(date "+%Y-%m-%d %H:%M:%S")"
git commit -m "${COMMIT_MESSAGE}"

if [[ "${GIT_PR_PREVIEW_PRIVATE_SSH_KEY}" == "" ]]; then
echo "Note: GIT_PR_PREVIEW_PRIVATE_SSH_KEY is empty, skipping..."
exit 0
fi
if [[ ${git_ref} != "refs/heads/main" ]]; then
if [[ "${GIT_PR_PREVIEW_PRIVATE_SSH_KEY}" == "" ]]; then
echo "Note: GIT_PR_PREVIEW_PRIVATE_SSH_KEY is empty, skipping..."
exit 0
fi
else
ssh-add <(echo "$GIT_PR_PREVIEW_PRIVATE_SSH_KEY" | base64 -d)

git push ${deploy_repo_push} gh-pages:gh-pages

0 comments on commit 9d318dc

Please sign in to comment.