GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — java-sdk/.utility/push-javadoc-to-gh-pages.sh at master · einsnull/java-sdk

Expand file tree

/

push-javadoc-to-gh-pages.sh

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
executable file
·
36 lines (25 loc) · 1.33 KB
/

push-javadoc-to-gh-pages.sh

Copy path

File metadata and controls

executable file
·
36 lines (25 loc) · 1.33 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/bash
if [ "$TRAVIS_REPO_SLUG" == "watson-developer-cloud/java-sdk" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_BRANCH" ] && [ "$TRAVIS_BUILD_NUMBER.1" == "$TRAVIS_JOB_NUMBER" ]; then
git config --global user.email "[email protected]"
git config --global user.name "travis-ci"
git clone --quiet --branch=gh-pages https://${GH_TOKEN}@github.com/watson-developer-cloud/java-sdk gh-pages > /dev/null
pushd gh-pages
# on tagged builds, $TRAVIS_BRANCH is the tag (e.g. v1.2.3), otherwise it's the branch name (e.g. master)
rm -rf docs/$TRAVIS_BRANCH
mkdir -p docs/$TRAVIS_BRANCH
cp -rf ../target/site/apidocs/* docs/$TRAVIS_BRANCH
../.utility/generate_index_html.sh > index.html
# update the latest/ symlink
# on tagged builds, $TRAVIS_TAG is set to the tag, but it's blank on regular builds, unlike $TRAVIS_BRANCH
if [ $TRAVIS_TAG ]; then
rm latest
ln -s ./$TRAVIS_TAG latest
fi
git add -f .
git commit -m "Latest javadoc for $TRAVIS_BRANCH ($TRAVIS_COMMIT)"
git push -fq origin gh-pages > /dev/null
popd
echo -e "Published Javadoc for build $TRAVIS_BUILD_NUMBER ($TRAVIS_JOB_NUMBER) on branch $TRAVIS_BRANCH.\n"
else
echo -e "Not publishing docs for build $TRAVIS_BUILD_NUMBER ($TRAVIS_JOB_NUMBER) on branch $TRAVIS_BRANCH of repo $TRAVIS_REPO_SLUG"
fi
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.