From ef2647bfd47d28bdeb6273dada3b44f95ac30bcc Mon Sep 17 00:00:00 2001 From: Maxime Schoemans Date: Thu, 5 Oct 2023 16:06:52 +0200 Subject: [PATCH] Generate documentation automatically --- .github/workflows/generate_docs.yml | 41 ++++++++++++++++++++--------- doc/index.md | 9 +++++++ 2 files changed, 37 insertions(+), 13 deletions(-) diff --git a/.github/workflows/generate_docs.yml b/.github/workflows/generate_docs.yml index 32499864fb..2d1f37788c 100644 --- a/.github/workflows/generate_docs.yml +++ b/.github/workflows/generate_docs.yml @@ -10,6 +10,7 @@ on: branches: - master - develop + - generate-docs jobs: build: @@ -27,18 +28,27 @@ jobs: - name: Install dependencies run: | sudo apt-get update - sudo apt-get install -y dblatex dbtoepub xsltproc + sudo apt-get install -y dblatex dbtoepub xsltproc texlive-lang-spanish # generate the documentation files - - name: Generate documentation + - name: Generate English documentation run: | - cd docs - dblatex -s texstyle.sty mobilitydb-workshop.xml - dbtoepub -o mobilitydb-workshop.epub mobilitydb-workshop.xml + cd doc + dblatex -s texstyle.sty -o mobilitydb-manual.pdf mobilitydb-manual.xml + dbtoepub -o mobilitydb-manual.epub mobilitydb-manual.xml mkdir html - xsltproc --stringparam html.stylesheet "docbook.css" --stringparam chunker.output.encoding "UTF-8" --xinclude -o html/index.html /usr/share/xml/docbook/stylesheet/docbook-xsl/html/chunk.xsl mobilitydb-workshop.xml + xsltproc --stringparam html.stylesheet "docbook.css" --stringparam chunker.output.encoding "UTF-8" --xinclude -o html/index.html /usr/share/xml/docbook/stylesheet/docbook-xsl/html/chunk.xsl mobilitydb-manual.xml cp -r images docbook.css html/ - cp docbook.css html/ + + # generate the documentation files + - name: Generate Spanish documentation + run: | + cd doc + dblatex -s texstyle.sty -o es/mobilitydb-manual.pdf es/mobilitydb-manual.xml + dbtoepub -o es/mobilitydb-manual.epub es/mobilitydb-manual.xml + mkdir es/html + xsltproc --stringparam html.stylesheet "docbook.css" --stringparam chunker.output.encoding "UTF-8" --xinclude -o es/html/index.html /usr/share/xml/docbook/stylesheet/docbook-xsl/html/chunk.xsl es/mobilitydb-manual.xml + cp -r images docbook.css es/html/ # store the documentation files - name: Upload output directory @@ -46,12 +56,17 @@ jobs: with: name: doc-files path: | - docs/index.md - docs/mobilitydb-workshop.pdf - docs/mobilitydb-workshop.epub - docs/html/docbook.css - docs/html/images/* - docs/html/*.html + doc/index.md + doc/mobilitydb-manual.pdf + doc/mobilitydb-manual.epub + doc/html/docbook.css + doc/html/images/* + doc/html/*.html + doc/es/mobilitydb-manual.pdf + doc/es/mobilitydb-manual.epub + doc/es/html/docbook.css + doc/es/html/images/* + doc/es/html/*.html retention-days: 1 diff --git a/doc/index.md b/doc/index.md index 3ca1040bc4..f14f578c18 100644 --- a/doc/index.md +++ b/doc/index.md @@ -1,3 +1,12 @@ + MobilityDB icon