1
0
Fork 0
forked from ilot/ilot-io

gitlab-ci: just copy src to public

This commit is contained in:
Antoine Martin 2024-06-30 22:36:18 -04:00
parent 25ecd2ae4a
commit 778cffaa61
Signed by: ayakael
GPG key ID: D62A472A4AA7D541

View file

@ -12,7 +12,7 @@ pages:
key: gitlab-pages key: gitlab-pages
paths: [public] paths: [public]
before_script: 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 # 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/.. - mkdir -p public/$CURRENT_CONTENT_PATH && ls public/$CURRENT_CONTENT_PATH/..
- | # create ephermetal branched path if not existent - | # create ephermetal branched path if not existent
@ -26,13 +26,7 @@ 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 - cp -R src/* public/.
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
- 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
environment: environment: