Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
Commit d1f6df74 authored by Deepak Khatri's avatar Deepak Khatri :dog:
Browse files

Update GitLab pages build

Thanks to Jason for creating these changes, https://git.beagleboard.org/jkridner/docs.beagleboard.io/-/commit/7c3717bb98f2572505bef8a95468dadbc4bfa1af
parent ebbdc8bf
Branches
Tags
No related merge requests found
......@@ -6,11 +6,10 @@ stages:
pages:
stage: deploy
script:
- sphinx-build -b html . public
- sphinx-build -M latexpdf . public
- mv public/latex/beagleboard-docs.pdf public/
- ./gitlab-build.sh
- export
artifacts:
paths:
- public
rules:
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
variables:
CI_DEBUG_TRACE: "true"
#!/bin/bash
env
if [ "$CI_COMMIT_BRANCH" == "$CI_DEFAULT_BRANCH" ]; then
rm -rf public
sphinx-build -b html . public/latest/
sphinx-build -M latexpdf . public/latest/
mv public/latest/latex/beagleboard-docs.pdf public/latest/
rm -rf public/latest/latex
cat <<HERE > public/index.html
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="refresh" content="0; url='latest/'" />
</head>
<body>
<p>Please follow <a href="latest/">this link</a>.</p>
</body>
</html>
HERE
elif [ "$CI_COMMIT_BRANCH" != "" ]; then
sphinx-build -b html . public/$CI_COMMIT_BRANCH/
sphinx-build -M latexpdf . public/$CI_COMMIT_BRANCH/
mv public/$CI_COMMIT_BRANCH/latex/beagleboard-docs.pdf public/$CI_COMMIT_BRANCH/
rm -rf public/$CI_COMMIT_BRANCH/latex
elif [ "$CI_COMMIT_TAG" != "" ]; then
export GIT_BRANCH=$(git branch -a --contains tags/$CI_COMMIT_TAG | grep origin | sed 's/.*origin\///')
sphinx-build -b html . public/$GIT_BRANCH/
sphinx-build -M latexpdf . public/$GIT_BRANCH/
mv public/$GIT_BRANCH/latex/beagleboard-docs.pdf public/$GIT_BRANCH/beagleboard-docs-$CI_COMMIT_TAG.pdf
ln -s public/$GIT_BRANCH/latex/beagleboard-docs-$CI_COMMIT_TAG.pdf public/$GIT_BRANCH/beagleboard-docs.pdf
rm -rf public/$GIT_BRANCH/latex
fi
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