Merge pull request #5870 from fgaz/new-install/bindir-method
[cabal.git] / travis-deploy.sh
blob88d7ddbbb9ba40abe719f7803d3974c3c3673409
1 #!/bin/sh
2 set -ex
4 deploy() {
5 git config --global user.email "builds@travis-ci.org"
6 git config --global user.name "Travis CI User"
7 git clone https://github.com/haskell/cabal-website.git cabal-website
8 (cd cabal-website && git checkout --track -b gh-pages origin/gh-pages)
9 rm -rf cabal-website/doc
10 mkdir -p cabal-website/doc/html
11 mv dist-newstyle/build/`uname -m`-$TRAVIS_OS_NAME/ghc-$GHCVER/Cabal-3.0.0.0/doc/html/Cabal \
12 cabal-website/doc/html/Cabal
13 (cd cabal-website && git add --all .)
14 (cd cabal-website && \
15 git commit --amend --reset-author -m "Deploy to GitHub ($(date)).")
16 (cd cabal-website && \
17 git push --force git@github.com:haskell/cabal-website.git \
18 gh-pages:gh-pages)
21 if [ "x$TRAVIS_REPO_SLUG" = "xhaskell/cabal" \
22 -a "x$TRAVIS_PULL_REQUEST" = "xfalse" \
23 -a "x$TRAVIS_BRANCH" = "xmaster" \
24 -a "x$DEPLOY_DOCS" = "xYES" ]
25 then
26 deploy