diff --git a/.travis.yml b/.travis.yml index cafa964..56056a9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,7 @@ matrix: addons: {apt: {packages: [cabal-install-3.0,ghc-8.4.4], sources: [hvr-ghc]}} - env: CABALVER=3.0 GHCVER=8.6.5 addons: {apt: {packages: [cabal-install-3.0,ghc-8.6.5], sources: [hvr-ghc]}} - - env: CABALVER=3.0 GHCVER=8.8.1 + - env: CABALVER=3.0 GHCVER=8.8.1 UPDATE_GH_PAGES=yes addons: {apt: {packages: [cabal-install-3.0,ghc-8.8.1], sources: [hvr-ghc]}} - env: CABALVER=head GHCVER=head addons: {apt: {packages: [cabal-install-head,ghc-head], sources: [hvr-ghc]}} diff --git a/update-gh-pages.sh b/update-gh-pages.sh index d1e06a8..198d680 100755 --- a/update-gh-pages.sh +++ b/update-gh-pages.sh @@ -3,7 +3,10 @@ SOURCE_BRANCH="master" TARGET_BRANCH="gh-pages" REPO="https://${GH_TOKEN}@github.com/hasufell/hpath" -DOC_LOCATION="/dist/doc/html/hpath" + +if [ -z "${UPDATE_GH_PAGES}" ] ; then + exit 0 +fi # Pull requests and commits to other branches shouldn't try to deploy, @@ -24,7 +27,7 @@ cd ${TARGET_BRANCH} || exit 1 echo "Removing old docs." rm -rf * echo "Adding new docs." -cp -rf "${TRAVIS_BUILD_DIR}${DOC_LOCATION}"/* . || exit 1 +cp -rf "${TRAVIS_BUILD_DIR}"/dist-newstyle/build/x86_64-linux/ghc-*/hpath-*/doc/html/hpath/* . || exit 1 # If there are no changes to the compiled out (e.g. this is a README update) # then just bail.