Skip to content

Commit

Permalink
ci: fixed deploy.sh for Github Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
JaCzekanski committed Dec 21, 2020
1 parent 70c8775 commit e95340b
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .ci/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,14 @@ else
fi

BRANCH=""
if [[ ! -z "${TRAVIS_BRANCH}" ]]; then
if [[ -n "${TRAVIS_BRANCH}" ]]; then
BRANCH=$TRAVIS_BRANCH
elif [[ ! -z "${APPVEYOR_REPO_BRANCH}" ]]; then
elif [[ -n "${APPVEYOR_REPO_BRANCH}" ]]; then
BRANCH=$APPVEYOR_REPO_BRANCH
else
echo "TRAVIS_BRANCH or APPVEYOR_REPO_BRANCH env not found"
elif [[ -n "${GITHUB_REF}" ]]; then
BRANCH=${GITHUB_REF##*/}
else
echo "TRAVIS_BRANCH, APPVEYOR_REPO_BRANCH or GITHUB_SHA env not found"
exit 3
fi

Expand All @@ -49,6 +51,6 @@ curl -X POST \
-H "X-Commit-Author: $AUTHOR" \
-H "X-Commit-Message: $MESSAGE" \
-H "X-Commit-Date: $DATE" \
$FILES $URL \
"$FILES" $URL \
&& echo Upload successful \
|| echo Upload failed

0 comments on commit e95340b

Please sign in to comment.