Skip to content
Permalink
Browse files

Auto deploy docs to github pages

  • Loading branch information...
joblo2213 committed Jul 18, 2019
1 parent 8fdba80 commit 95de7efe9448620dec53fa4149ec2d24d21ff9d0
Showing with 42 additions and 0 deletions.
  1. +1 −0 .gitignore
  2. +20 −0 .scripts/update-docs.sh
  3. +21 −0 .travis.yml
@@ -8,6 +8,7 @@ project/plugins/project/
.cache
.lib/
*.log
/docs/

# MacOS
.DS_Store
@@ -0,0 +1,20 @@
#!/bin/bash
set -ev
SCALA_MAJOR=$(echo $TRAVIS_SCALA_VERSION | grep '^\d+\.\d+' -o)

# Update the java-/scaladocs on https://github.com/codeoverflow-org/chatoverflow-gh-pages

echo "Configuring git..."
git config --global user.email "travis@travis-ci.org"
git config --global user.name "Travis CI"

echo "Cloning docs repo..."
git clone https://${GH_TOKEN}@github.com/codeoverflow-org/chatoverflow-gh-pages docs

echo "Copying docs..."
cp -fR target/scala-$SCALA_MAJOR/api chatoverflow

echo "Updating wiki..."

git commit --message "Deployed doc (Travis build #$TRAVIS_BUILD_NUMBER)"
git push --force origin master
@@ -0,0 +1,21 @@
notifications:
email: false
branches:
only:
- master
language: scala
jdk: oraclejdk8
scala:
- 2.12.5
cache:
directories:
- $HOME/.ivy2/cache
- $HOME/.sbt
before_cache:
- rm -fv $HOME/.ivy2/.sbt.ivy.lock
- find $HOME/.ivy2/cache -name "ivydata-*.properties" -print -delete
- find $HOME/.sbt -name "*.lock" -print -delete
script:
- sbt ++$TRAVIS_SCALA_VERSION -Dfile.encoding=UTF8 doc
- chmod +x .scripts/update-docs.sh
- bash .scripts/update-docs.sh

0 comments on commit 95de7ef

Please sign in to comment.
You can’t perform that action at this time.