Skip to content
Snippets Groups Projects
Commit e8c82f36 authored by lukas leufen's avatar lukas leufen
Browse files

add create documentation sh

parent 2fadc0ff
No related branches found
No related tags found
3 merge requests!125Release v0.10.0,!124Update Master to new version v0.10.0,!91WIP: Resolve "create sphinx docu"
#!/bin/bash
# reset status
echo "failure" > status.txt
# create webpage folder
BRANCH_NAME=$( echo -e "${CI_COMMIT_REF_NAME////_}")
mkdir -p webpage/
mkdir -p webpage/recent
for w in master develop
do
if [[ "${CI_COMMIT_REF_NAME}" == "$w" ]]; then
mkdir -p "webpage/${BRANCH_NAME}"
fi
done
cd docs || {
echo "no docs to build available";
echo "incomplete" > status.txt;
echo "no docs to build avail" > incomplete.txt;
exit 0; }
echo "${CI_COMMIT_TAG}"
make clean
make html
IS_FAILED=$?
# copy results
cp -r ./_build/html/* "../webpage/${BRANCH_NAME}/."
cp -r ./_build/html/* ../webpage/recent/.
if [[ "${CI_COMMIT_REF_NAME}" = "master" ]]; then
cp -r ./_build/html/* ../webpage/.
fi
cd ..
# report if job was successful
if [[ ${IS_FAILED} == 0 ]]; then
echo "success"
echo "success" > status.txt
echo "build" > success.txt
exit 0
else
echo "failed"
exit 1
fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment