From cea1578e8a194c615ae5b618fc892a6cf83a6e06 Mon Sep 17 00:00:00 2001 From: Yvan Lussaud Date: Fri, 23 Aug 2024 11:53:36 +0200 Subject: [PATCH] Fixed #524 Online help missing. --- .github/workflows/maven.yml | 6 ------ scripts/website-build.sh | 27 ++++++++++++++++++++++----- scripts/website-install.sh | 12 ------------ 3 files changed, 22 insertions(+), 23 deletions(-) delete mode 100644 scripts/website-install.sh diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index e33f95fe9..6db3c877e 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -64,12 +64,6 @@ jobs: key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml', '**/*.product') }} restore-keys: | ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml', '**/*.product') }} - - - name: Setup website (documentation) - if: ${{ steps.updatesite_check.outputs.UPDATE_SITES }} - run: | - chmod a+x ./scripts/website-install.sh - ./scripts/website-install.sh - name: Create directory for website (documentation) run: | diff --git a/scripts/website-build.sh b/scripts/website-build.sh index 5036bcde5..5d17d0588 100644 --- a/scripts/website-build.sh +++ b/scripts/website-build.sh @@ -7,11 +7,28 @@ echo "Clone gh-pages" git clone https://$GH_TOKEN@github.com/ObeoNetwork/M2Doc.git -b gh-pages --quiet . if [[ "$TAG" != "" ]]; then chmod a+x ./promote.sh; ./promote.sh $TAG; fi echo "Build gh-pages" -jekyll build -ls -# copy to documentation plugin -echo "Copy to documentation plugin" +# create documentation folder mkdir ../plugins/org.obeonetwork.m2doc.doc/doc -cp -Rf _site/* ../plugins/org.obeonetwork.m2doc.doc/doc/ +# download the nighlty documentation +echo " - Download nightly documentation" +wget -r --no-parent --no-host-directories -P ../plugins/org.obeonetwork.m2doc.doc/doc/ https://www.m2doc.org/ref-doc/nightly/ +# replace nigthly by current tag +if [ -n "$TAG" ]; then + echo " - Replace Nightly to" $TAG + find ../plugins/org.obeonetwork.m2doc.doc/doc/ -name "*.html" -exec sed -i 's#Nightly#'$TAG'#g' {} \; + find ../plugins/org.obeonetwork.m2doc.doc/doc/ -name "*.html" -exec sed -i 's#nightly#'$TAG'#g' {} \; +fi +# remove the navigation bar +echo " - Remove navigation bar" +find ../plugins/org.obeonetwork.m2doc.doc/doc/ -name "*.html" -exec sed -i '/