Commit c05c3e87 authored by Mikhail Glushenkov's avatar Mikhail Glushenkov
Browse files

More haddocks uploading fixes.

1. Unbreak the deployment script (hopefully the last time).
2. No longer attempt to upload docs when building from non-main repos.

Fixes #3592.
parent abc085e8
......@@ -70,7 +70,7 @@ before_install:
# NB: these commands MUST be in .travis.yml, otherwise the secret key can be
# leaked! See https://github.com/travis-ci/travis.rb/issues/423.
# umask to get the permissions to be 400.
- if [ "x$TRAVIS_PULL_REQUEST" = "xfalse" -a "x$TRAVIS_BRANCH" = "xmaster" -a "x$DEPLOY_DOCS" = "xYES" ]; then (umask 377 && openssl aes-256-cbc -K $encrypted_edaf6551664d_key -iv $encrypted_edaf6551664d_iv -in id_rsa_cabal_website.aes256.enc -out ~/.ssh/id_rsa -d); fi
- if [ "x$TRAVIS_REPO_SLUG" = "xhaskell/cabal" -a "x$TRAVIS_PULL_REQUEST" = "xfalse" -a "x$TRAVIS_BRANCH" = "xmaster" -a "x$DEPLOY_DOCS" = "xYES" ]; then (umask 377 && openssl aes-256-cbc -K $encrypted_edaf6551664d_key -iv $encrypted_edaf6551664d_iv -in id_rsa_cabal_website.aes256.enc -out ~/.ssh/id_rsa -d); fi
install:
# We intentionally do not install anything before trying to build Cabal because
......
......@@ -6,15 +6,22 @@ deploy() {
git config --global user.name "Travis CI User"
git clone https://github.com/haskell/cabal-website.git cabal-website
(cd cabal-website && git checkout --track -b gh-pages origin/gh-pages)
rm -rf cabal-website/doc
mkdir -p cabal-website/doc/html
mv dist-newstyle/build/Cabal-1.25.0.0/doc/html/Cabal cabal-website/doc/html/Cabal
mv dist-newstyle/build/Cabal-1.25.0.0/doc/html/Cabal \
cabal-website/doc/html/Cabal
(cd cabal-website && git add --all .)
(cd cabal-website && git commit --amend --reset-author -m "Deploy to GitHub ($(date)).")
(cd cabal-website && git push --force git@github.com:haskell/cabal-website.git gh-pages:gh-pages)
(cd cabal-website && \
git commit --amend --reset-author -m "Deploy to GitHub ($(date)).")
(cd cabal-website && \
git push --force git@github.com:haskell/cabal-website.git \
gh-pages:gh-pages)
}
if [ "x$TRAVIS_PULL_REQUEST" = "xfalse" -a "x$TRAVIS_BRANCH" = "xmaster" \
-a "x$DEPLOY_DOCS" = "xYES" ]
if [ "x$TRAVIS_REPO_SLUG" = "xhaskell/cabal" \
-a "x$TRAVIS_PULL_REQUEST" = "xfalse" \
-a "x$TRAVIS_BRANCH" = "xmaster" \
-a "x$DEPLOY_DOCS" = "xYES" ]
then
deploy
fi
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment