mirror of
https://github.com/SAP/jenkins-library.git
synced 2026-06-19 22:58:55 +02:00
Merge pull request #310 from SAP/pr/fixdocudeployment
fix docu deployment
This commit is contained in:
+1
-8
@@ -21,14 +21,7 @@ script:
|
||||
echo "Found change on master: Deployment of documentation"
|
||||
PRIVATE_KEY="cfg/id_rsa"
|
||||
openssl aes-256-cbc -K $encrypted_12c8071d2874_key -iv $encrypted_12c8071d2874_iv -in cfg/id_rsa.enc -out "${PRIVATE_KEY}" -d
|
||||
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"
|
||||
docker run --rm -it -v ~/.ssh:/root/.ssh -v ${TRAVIS_BUILD_DIR}:/docs -w /docs/documentation squidfunk/mkdocs-material gh-deploy -v --clean --remote-name docu
|
||||
docker run --rm -it --entrypoint "./gh-pages-deploy.sh" -e "TRAVIS_REPO_SLUG=${TRAVIS_REPO_SLUG}" -v ${TRAVIS_BUILD_DIR}:/docs -w /docs squidfunk/mkdocs-material
|
||||
else
|
||||
echo "Publishing documentation skipped."
|
||||
fi
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
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 documentation
|
||||
mkdocs gh-deploy -v --clean --remote-name docu
|
||||
Reference in New Issue
Block a user