-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Travis build configured to automatically publish to Github pages
- Loading branch information
1 parent
1e8245f
commit 7a5a494
Showing
2 changed files
with
36 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,13 @@ | ||
before_script: | ||
- "export DISPLAY=:99.0" | ||
- "sh -e /etc/init.d/xvfb start" | ||
- sleep 3 # give xvfb some time to start | ||
|
||
language: java | ||
jdk: | ||
- oraclejdk8 | ||
- oraclejdk8 | ||
- oraclejdk7 | ||
env: | ||
global: | ||
- secure: Aks/9RTuubSZSP5N3Do7uldJk5tpYLcq4atTzhClhV3LkphFzeOhE5WnL1CrwVhSx8wk8LQi6VQcmSt0ayjH1Vi7oABmfWv7YfI6wUaHBmCnb/vTE/ixoxVi5Px3QlOOaKj/xdmgHq/TV97PmGQ4bFU95uBpA+6sQfvf7qw3wLE= | ||
before_script: | ||
- export DISPLAY=:99.0 | ||
- sh -e /etc/init.d/xvfb start | ||
- sleep 3 | ||
after_success: | ||
- ".utility/push-output-to-ghpages.sh" |
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,25 @@ | ||
#!/bin/bash | ||
|
||
REPO=concordion/concordion-storyboard-extension-demo | ||
|
||
if [ "$TRAVIS_REPO_SLUG" == "$REPO" ] && [ "$TRAVIS_JDK_VERSION" == "oraclejdk8" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_BRANCH" == "master" ]; then | ||
|
||
echo -e "Publishing output...\n" | ||
|
||
cp -R build/reports/spec $HOME/spec-latest | ||
|
||
cd $HOME | ||
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/$REPO gh-pages > /dev/null | ||
|
||
cd gh-pages | ||
git rm -rf ./spec | ||
cp -Rf $HOME/spec-latest ./spec | ||
git add -f . | ||
git commit -m "Latest output on successful travis build $TRAVIS_BUILD_NUMBER auto-pushed to gh-pages" | ||
git push -fq origin gh-pages > /dev/null | ||
|
||
echo -e "Published output to gh-pages.\n" | ||
|
||
fi |