Skip to content

Commit

Permalink
Merge pull request #6 from MobilityDB/Lorenc1o-patch-1
Browse files Browse the repository at this point in the history
Create main.yml
  • Loading branch information
estebanzimanyi committed Sep 22, 2023
2 parents a33e80f + 3b2a7c1 commit c549080
Showing 1 changed file with 72 additions and 0 deletions.
72 changes: 72 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Automatic generation of documentation will be copied and checked into the
# gh-pages branch.
name: Documentation generation CI

on:
push:
branches: [ master ]

jobs:
build:
name: Generate documentation
runs-on: ubuntu-latest

steps:
# checkout branch
- uses: actions/checkout@v3

# Install dblatex
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y dblatex dbtoepub xsltproc
# generate the documentation files
- name: Generate documentation
run: |
cd docs
dblatex -s texstyle.sty -T native -t pdf -o mobilitydb-berlinmod.pdf mobilitydb-berlinmod.xml
dbtoepub -o mobilitydb-berlinmod.epub mobilitydb-berlinmod.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-berlinmod.xml
cp -r images docbook.css html/
cp docbook.css html/
# store the documentation files
- name: Upload output directory
uses: actions/upload-artifact@v2
with:
name: doc-files
path: docs
retention-days: 1


copy:
name: Deploy documentation
runs-on: ubuntu-latest
needs: build

steps:
# checkout the gh-pages branch
- uses: actions/checkout@v3
with:
ref: gh-pages

# download the doc files, most of which are generated above
- name: Download output directory
uses: actions/download-artifact@v2
with:
name: doc-files
path: docs

# add, commit and push to gh-pages
- name: Commit changes
uses: EndBug/add-and-commit@v7
with:
message: 'Update docs'
branch: gh-pages
add: '["docs/index.md",
"docs/mobilitydb-berlinmod.pdf",
"docs/mobilitydb-berlinmod.epub",
"docs/html/docbook.css", "docs/html/images/*",
"docs/html/*.html"]'

0 comments on commit c549080

Please sign in to comment.