forked from ilot/ilot-io
gitlab-ci: just copy src to public
This commit is contained in:
parent
25ecd2ae4a
commit
778cffaa61
1 changed files with 2 additions and 8 deletions
|
@ -12,7 +12,7 @@ pages:
|
|||
key: gitlab-pages
|
||||
paths: [public]
|
||||
before_script:
|
||||
- sudo apk add git ikiwiki po4a perl-yaml-tiny tree
|
||||
- sudo apk add tree
|
||||
# CURRENT_CONTENT_PATH is defined in rules, different between main branch and ephemeral branches
|
||||
- mkdir -p public/$CURRENT_CONTENT_PATH && ls public/$CURRENT_CONTENT_PATH/..
|
||||
- | # create ephermetal branched path if not existent
|
||||
|
@ -26,13 +26,7 @@ pages:
|
|||
fi
|
||||
- rm -rf public/$CURRENT_CONTENT_PATH || true # remove last version of current branch
|
||||
script:
|
||||
- | # sed needs to be in its own section
|
||||
sed -i "s|destdir.*|destdir: ./public/$CURRENT_CONTENT_PATH|" ikiwiki.setup
|
||||
- ikiwiki --setup ikiwiki.setup
|
||||
- | # create symbolic link to index.en.html if public/index.html does not exist
|
||||
if [ ! -L "public/$CURRENT_CONTENT_PATH/index.html" ]; then
|
||||
ln -s index.en.html public/$CURRENT_CONTENT_PATH/index.html
|
||||
fi
|
||||
- cp -R src/* public/.
|
||||
- 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
|
||||
environment:
|
||||
|
|
Loading…
Add table
Reference in a new issue