Skip to content

Commit

Permalink
Generate documentation automatically
Browse files Browse the repository at this point in the history
  • Loading branch information
mschoema committed Oct 5, 2023
1 parent 4c9335a commit ef2647b
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 13 deletions.
41 changes: 28 additions & 13 deletions .github/workflows/generate_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
branches:
- master
- develop
- generate-docs

jobs:
build:
Expand All @@ -27,31 +28,45 @@ 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
uses: actions/upload-artifact@v2
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


Expand Down
9 changes: 9 additions & 0 deletions doc/index.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
<!--
****************************************************************************
MobilityDB Manual
Copyright(c) MobilityDB Contributors
This documentation is licensed under a Creative Commons Attribution-Share
Alike 3.0 License: https://creativecommons.org/licenses/by-sa/3.0/
****************************************************************************
-->
<img src="https://MobilityDB.github.io/MobilityDB/images/mobilitydb-logo.png"
alt="MobilityDB icon"
style="float: center; margin-right: 10px;" />
Expand Down

0 comments on commit ef2647b

Please sign in to comment.