gitlab-ci: fix test preview feature
This commit is contained in:
parent
aaf6a6a030
commit
3448fc5785
1 changed files with 4 additions and 8 deletions
|
@ -26,16 +26,12 @@ pages:
|
||||||
fi
|
fi
|
||||||
- rm -rf public/$CURRENT_CONTENT_PATH || true # remove last version of current branch
|
- rm -rf public/$CURRENT_CONTENT_PATH || true # remove last version of current branch
|
||||||
script:
|
script:
|
||||||
|
- | # sed needs to be in its own section
|
||||||
|
sed -i "s|destdir.*|destdir: ./public/$CURRENT_CONTENT_PATH|" ikiwiki.setup
|
||||||
- ikiwiki --setup ikiwiki.setup
|
- ikiwiki --setup ikiwiki.setup
|
||||||
- | # create symbolic link to index.en.html if public/index.html does not exist
|
- | # create symbolic link to index.en.html if public/index.html does not exist
|
||||||
if [ ! -L "public/index.html" ]; then
|
if [ ! -L "public/$CURRENT_CONTENT_PATH/index.html" ]; then
|
||||||
ln -s index.en.html public/index.html
|
ln -s index.en.html public/$CURRENT_CONTENT_PATH/index.html
|
||||||
fi
|
|
||||||
- |
|
|
||||||
if [ -z "$CURRENT_CONTENT_PATH" ]; then
|
|
||||||
mv public output
|
|
||||||
mkdir -p public
|
|
||||||
mv public public/$CURRENT_CONTENT_PATH
|
|
||||||
fi
|
fi
|
||||||
- cd public/$EPHEMERAL_BRANCHES_PATH
|
- cd public/$EPHEMERAL_BRANCHES_PATH
|
||||||
- tree -d -H '.' -L 1 --noreport --charset utf-8 -T "Versions" -o index.html # generate a root HTML listing all previews for easier access
|
- tree -d -H '.' -L 1 --noreport --charset utf-8 -T "Versions" -o index.html # generate a root HTML listing all previews for easier access
|
||||||
|
|
Loading…
Reference in a new issue