Skip to content

Commit

Permalink
Fixed #524 Online help missing.
Browse files Browse the repository at this point in the history
  • Loading branch information
ylussaud committed Aug 23, 2024
1 parent 8489ba0 commit cea1578
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 23 deletions.
6 changes: 0 additions & 6 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
27 changes: 22 additions & 5 deletions scripts/website-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 '/<nav/,/nav>/d' {} \;
# replace all download versions link
echo " - Replace all versions download link"
find ../plugins/org.obeonetwork.m2doc.doc/doc/ -name "*.html" -exec sed -i 's#../../download/#all-versions#https://github.com/ObeoNetwork/M2Doc/releases#g' {} \;
# copy static resources
echo " - Copy static resources"
cp -R css ../plugins/org.obeonetwork.m2doc.doc/doc/
cp -R images ../plugins/org.obeonetwork.m2doc.doc/doc/
cp -R capella ../plugins/org.obeonetwork.m2doc.doc/doc/
cp -R font-awesome ../plugins/org.obeonetwork.m2doc.doc/doc/
cd -

12 changes: 0 additions & 12 deletions scripts/website-install.sh

This file was deleted.

0 comments on commit cea1578

Please sign in to comment.