Try to fix update-gh-pages

This commit is contained in:
Julian Ospald 2019-12-31 00:44:06 +01:00
parent 8412ea96fb
commit a487f02894
No known key found for this signature in database
GPG Key ID: 511B62C09D50CD28
2 changed files with 6 additions and 3 deletions

View File

@ -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]}}

View File

@ -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.