File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -24,14 +24,15 @@ DST=${WORKSPACE%/}/${RELATIVE_DST}
24
24
TMP_DST=/tmp/makedocs
25
25
echo " Source: ${SRC} ; Destination: ${DST} "
26
26
# Generate index if absent
27
- if [ ! -f " ${SRC} /index.md" ] ; then
27
+ if [ ! -f " ${SRC} /index.md" -a ! -f " ${SRC} /README.md " ] ; then
28
28
echo " Index file (index.md) not found. It will be created using a script..."
29
29
echo " # ${REPOSITORY} " > " ${SRC} /index.md"
30
30
CLEAN_INDEX=true
31
31
fi
32
32
# Copy static template files
33
33
export SRC_THEME=" ${SRC} /theme"
34
34
mkdir -p " ${SRC_THEME} " && cp -f /usr/local/src/theme.main.html " ${SRC_THEME} /main.html"
35
+ CLEAN_THEME=true
35
36
# Convert docs to temp folder
36
37
mkdocs build -c -f /usr/local/src/mkdocs.yml -d " ${TMP_DST} "
37
38
# Copy static assets to be added
@@ -44,3 +45,6 @@ mv -f "${TMP_DST}" "${DST}"
44
45
if [ " ${CLEAN_INDEX} " = true ] ; then
45
46
rm " ${SRC} /index.md"
46
47
fi
48
+ if [ " ${CLEAN_THEME} " = true ] ; then
49
+ rm -rf " ${SRC_THEME} "
50
+ fi
You can’t perform that action at this time.
0 commit comments