@@ -0,0 +1,52 @@
1+SERVANT_DIR=/tmp/servant-gh-pages
3+# Make a temporary clone
7+git clone . $SERVANT_DIR
11+# Make sure to pull the latest
13+git remote add haskell-servant git@github.com:haskell-servant/servant.git
15+git fetch haskell-servant
17+git reset --hard haskell-servant/gh-pages
19+# Clear everything away
21+git rm -rf $SERVANT_DIR/*
23+# Switch back and build the haddocks
27+cabal configure --builddir=$SERVANT_DIR
29+cabal haddock --hoogle --hyperlink-source --html-location='https://hackage.haskell.org/package/$pkg-$version/docs' --builddir=$SERVANT_DIR
31+commit_hash=$(git rev-parse HEAD)
33+# Move the HTML docs to the root
39+mv doc/html/servant/* .
46+git commit -m "Built from $commit_hash"
48+# Push to update the pages
50+git push haskell-servant HEAD:gh-pages