fix(scripts): stop gh-pages script from failing for pull requests

https://github.com/mozilla/fxa-email-service/pull/118
r=vladikoff
This commit is contained in:
Phil Booth 2018-07-04 23:32:25 +01:00 коммит произвёл GitHub
Родитель b47e2f9d4a
Коммит 8e48f36ead
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 16 добавлений и 19 удалений

Просмотреть файл

@ -6,24 +6,21 @@
set -e
[ "$TRAVIS_BRANCH" = master ]
if [ "$TRAVIS_BRANCH" = "master" ] && [ "$TRAVIS_PULL_REQUEST" = "false" ]; then
eval key=\$encrypted_08b3d3de2dc6_key
eval iv=\$encrypted_08b3d3de2dc6_iv
[ "$TRAVIS_PULL_REQUEST" = false ]
mkdir -p ~/.ssh
openssl aes-256-cbc -K $key -iv $iv -in scripts/id_rsa.enc -out ~/.ssh/id_rsa -d
chmod 600 ~/.ssh/id_rsa
eval key=\$encrypted_08b3d3de2dc6_key
eval iv=\$encrypted_08b3d3de2dc6_iv
mkdir -p ~/.ssh
openssl aes-256-cbc -K $key -iv $iv -in scripts/id_rsa.enc -out ~/.ssh/id_rsa -d
chmod 600 ~/.ssh/id_rsa
git clone --branch gh-pages git@github.com:mozilla/fxa-email-service.git docs
cd docs
git config user.name "fxa-devs"
git config user.email "fxa-core@mozilla.com"
rm -rf *
mv ../target/doc/* .
git add -A .
git commit -qm "chore(docs): rebuild developer docs"
git push -q origin gh-pages
git clone --branch gh-pages git@github.com:mozilla/fxa-email-service.git docs
cd docs
git config user.name "fxa-devs"
git config user.email "fxa-core@mozilla.com"
rm -rf *
mv ../target/doc/* .
git add -A .
git commit -qm "chore(docs): rebuild developer docs"
git push -q origin gh-pages
fi