mirror of
https://github.com/SAP/jenkins-library.git
synced 2025-03-03 15:02:35 +02:00
Only changes to master and PRs starts the travis job. On PR Maven tests and mkdocs build for warnings and error check is done. On change on master Maven is **not** run and the documentation is built and deployed using a deploy key. The encrypted deploy key is not part of this commit, it needs to be provided by an admin for this repository.
16 lines
448 B
Bash
Executable File
16 lines
448 B
Bash
Executable File
#!/bin/bash
|
|
|
|
echo "Found change on master: Deployment of documentation"
|
|
|
|
PRIVATE_KEY="cfg/id_rsa"
|
|
|
|
chmod 600 "${PRIVATE_KEY}"
|
|
eval `ssh-agent -s`
|
|
ssh-add "${PRIVATE_KEY}"
|
|
git config user.name "Travis CI Publisher"
|
|
git remote add docu "git@github.com:$TRAVIS_REPO_SLUG.git";
|
|
git fetch docu gh-pages:gh-pages
|
|
echo "Pushing to gh-pages of repository $TRAVIS_REPO_SLUG"
|
|
cd $TRAVIS_BUILD_DIR/documentation
|
|
mkdocs gh-deploy -v --clean --remote-name docu
|