From f3d197a9c683653ec3808dec76e34bdc06692848 Mon Sep 17 00:00:00 2001 From: Martin Weise <martin.weise@tuwien.ac.at> Date: Wed, 25 Dec 2024 17:43:41 +0100 Subject: [PATCH] Updated docs --- .docs/{redirect.html => index.html.tpl} | 8 +++----- .gitlab-ci.yml | 3 ++- build-docs.sh | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) rename .docs/{redirect.html => index.html.tpl} (58%) diff --git a/.docs/redirect.html b/.docs/index.html.tpl similarity index 58% rename from .docs/redirect.html rename to .docs/index.html.tpl index 69ede955cd..d92d7c4b18 100644 --- a/.docs/redirect.html +++ b/.docs/index.html.tpl @@ -1,20 +1,18 @@ <!DOCTYPE html> <html lang="en"> -<!-- This file exists only once - in the final documentation --> <head> <meta charset="UTF-8"> <title>Redirect Notice</title> - <meta http-equiv="Refresh" content="0; url='/infrastructures/dbrepo/1.5/'" /> + <meta http-equiv="Refresh" content="0; url='/infrastructures/dbrepo/${DOC_VERSION}/'" /> </head> <body> <h1>Redirect Notice</h1> <p> - This page should automatically open the documentation for version <code>1.5</code>. In case this page does not load the site is + This page should automatically open the documentation for version <code>${DOC_VERSION}</code>. In case this page does not load the site is available at: </p> <p> - <a href="/infrastructures/dbrepo/1.5/">/infrastructures/dbrepo/1.5/</a> + <a href="/infrastructures/dbrepo/${DOC_VERSION}/">/infrastructures/dbrepo/${DOC_VERSION}/</a> </p> </body> </html> \ No newline at end of file diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ce79f1a01f..889a1560f6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -443,6 +443,7 @@ release-docs: - "cp -r ./site/* ./final/${DOC_VERSION}" # mkdocs - "cp .docker/dist.tar.gz ./final/${APP_VERSION}/dist.tar.gz" # dist - "cp .docs/redirect.html ./final/${APP_VERSION}/index.html" # redirect patch docs + - sed -i "s/\${DOC_VERSION}/${DOC_VERSION}/g" index.html - "bash ./.gitlab/gen-badge.sh" - eval $(ssh-agent -s) - "mkdir -p /root/.ssh" @@ -452,7 +453,7 @@ release-docs: - tar czf ./final.tar.gz ./final - "scp -oHostKeyAlgorithms=+ssh-rsa -oPubkeyAcceptedAlgorithms=+ssh-rsa final.tar.gz $CI_DOC_USER@$CI_DOC_IP:final.tar.gz" - "scp -oHostKeyAlgorithms=+ssh-rsa -oPubkeyAcceptedAlgorithms=+ssh-rsa versions.json $CI_DOC_USER@$CI_DOC_IP:/system/user/ifs/infrastructures/public_html/dbrepo/versions.json" - - "scp -oHostKeyAlgorithms=+ssh-rsa -oPubkeyAcceptedAlgorithms=+ssh-rsa .docs/redirect.html $CI_DOC_USER@$CI_DOC_IP:/system/user/ifs/infrastructures/public_html/dbrepo/index.html" + - "scp -oHostKeyAlgorithms=+ssh-rsa -oPubkeyAcceptedAlgorithms=+ssh-rsa .docs/index.html.tpl $CI_DOC_USER@$CI_DOC_IP:/system/user/ifs/infrastructures/public_html/dbrepo/index.html" - 'ssh -oHostKeyAlgorithms=+ssh-rsa -oPubkeyAcceptedAlgorithms=+ssh-rsa $CI_DOC_USER@$CI_DOC_IP "rm -rf /system/user/ifs/infrastructures/public_html/dbrepo/${DOC_VERSION}; tar xzf ./final.tar.gz; rm -f ./final.tar.gz; cp -r ./final/* /system/user/ifs/infrastructures/public_html/dbrepo; rm -rf ./final"' release-libs: diff --git a/build-docs.sh b/build-docs.sh index fba2afc766..8639b3756f 100644 --- a/build-docs.sh +++ b/build-docs.sh @@ -89,6 +89,6 @@ done # finalization echo "===================================================" echo "Moving HTML redirect and JSON versions to /" -cp ./final/${APP_VERSION}/redirect.html ./final/index.html +cp ./final/${APP_VERSION}/index.html.tpl ./final/index.html cp ./final/${APP_VERSION}/versions.json ./final/versions.json echo "===================================================" -- GitLab