forked from kubevirt/kubevirt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Publish API Reference on Travis-CI deploy
- Loading branch information
1 parent
35eea01
commit 5334c87
Showing
4 changed files
with
50 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
GITHUB_FQDN=github.com | ||
API_REF_REPO=kubevirt-incubator/api-reference | ||
API_REF_DIR=/tmp/api-reference | ||
|
||
git clone \ | ||
"https://${API_REFERENCE_PUSH_TOKEN}@${GITHUB_FQDN}/${API_REF_REPO}.git" \ | ||
"${API_REF_DIR}" > /dev/null 2>&1 | ||
rm -rf "${API_REF_DIR}/content/"* | ||
cp -f hack/gen-swagger-doc/html5/content/*.html "${API_REF_DIR}/content/" | ||
|
||
cd "${API_REF_DIR}" | ||
|
||
git config --global user.email "[email protected]" | ||
git config --global user.name "Travis CI" | ||
|
||
if git status --porcelain | grep --quiet "^ M" ; | ||
then | ||
git add -A content/*.html | ||
git commit --message "API Reference update by Travis Build ${TRAVIS_BUILD_NUMBER}" | ||
|
||
git push origin master > /dev/null 2>&1 | ||
echo "API Reference updated." | ||
else | ||
echo "API Reference hasn't changed." | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters