Skip to content

Update new6.yml

Update new6.yml #36

Workflow file for this run

name: DITA-OT-OCRD-FAQ_V4
on:
push:
tags:
- 'v6[0-9]+.[0-9]+.[0-9]+'
workflow_dispatch:
jobs:
build-dita:
name: Build DITA
runs-on: ubuntu-latest
permissions:
checks: write
contents: write
steps:
- name: Git checkout
uses: actions/checkout@v3
- name: clone ocrd-wiki to german
run: |
git clone https://github.com/OCR-D/ocrd-website.wiki.git
mv ocrd-website.wiki de/
- name: clone ocrd-wiki to english
run: |
git clone https://github.com/OCR-D/ocrd-website.wiki.git
mv ocrd-website.wiki en/
- name: download DITA dtd
run: |
cd de/xsl
wget https://github.com/oxygenxml/oxygen-dita-translation-package-builder-addon/archive/refs/heads/master.zip
unzip master.zip
- name: Download and install saxon german
run: |
wget https://www.saxonica.com/download/SaxonEE11-1J.zip
unzip SaxonEE11-1J.zip
- name: add wiki faq german
run: |
java -jar saxon-ee-11.1.jar -xsl:de/xsl/wiki.xsl \
-catalog:de/xsl/oxygen-dita-translation-package-builder-addon-master/config/catalogs/catalog.xml \
-s:de/ocrd_ocrd.ditamap \
-o:de/ocrd_ocrd_wiki.ditamap
- name: add wiki faq english
run: |
java -jar saxon-ee-11.1.jar -xsl:en/xsl/wiki.xsl \
-catalog:de/xsl/oxygen-dita-translation-package-builder-addon-master/config/catalogs/catalog.xml \
-s:en/ocrd_ocrd.ditamap \
-o:en/ocrd_ocrd_wiki.ditamap
- name: Build Bootstrap-german
uses: dita-ot/dita-ot-action@master
with:
install: |
apt-get update -q
export DEBIAN_FRONTEND=noninteractive
apt-get install -qy --no-install-recommends nodejs
dita-ot-version: 4.1
plugins : |
https://github.com/jason-fox/fox.jason.extend.css/archive/master.zip
https://github.com/infotexture/dita-bootstrap/archive/master.zip
fox.jason.prismjs
fox.jason.favicon
project: .github/dita-ot/html.xml
- name: Build Bootstrap-english
uses: dita-ot/dita-ot-action@master
with:
install: |
apt-get update -q
export DEBIAN_FRONTEND=noninteractive
apt-get install -qy --no-install-recommends nodejs
dita-ot-version: 4.1
plugins : |
fox.jason.extend.css
net.infotexture.dita-bootstrap
fox.jason.prismjs
fox.jason.favicon
project: .github/dita-ot/html_en.xml
- name: output dir
run: |
cd out
sudo mkdir rules
sudo mkdir schema
- name: transform rules
run: sudo java -jar saxon-ee-11.1.jar -xsl:de/xsl/rules.xsl -s:de/trans/trFremdsprache.dita -o:out/rules/ruleset_character.json &&
sudo java -jar saxon-ee-11.1.jar -xsl:de/xsl/rules.xsl -s:de/trans/trLigaturen2.dita -o:out/rules/ruleset_ligature.json &&
sudo java -jar saxon-ee-11.1.jar -xsl:de/xsl/rules.xsl -s:de/trans/trSilbentrennung.dita -o:out/rules/ruleset_hyphenation.json &&
sudo java -jar saxon-ee-11.1.jar -xsl:de/xsl/rules.xsl -s:de/trans/trRom.dita -o:out/rules/ruleset_roman_digits.json
- name: copy images
run: |
sudo cp de/resources/dfg_logo_schriftzug_blau_foerderung_4c.jpg out/html/resources/
sudo cp de/resources/icon20x24px-exported-transparent.png out/html/resources/
- name: copy schema
run: |
sudo cp schema/OCR-D-GT-levelSchema.json out/schema/
- name: Get SDK Version from config
id: lookupSdkVersion
uses: mikefarah/yq@master
with:
cmd: |
yq eval 'append("commit: ${{ github.ref_name }}\nversion: ${{ github.run_number }}_${{ github.ref_name }}\ndate-released: $(date +'%Y-%m-%d')\n")' CITATION.cff
- name: Commit Citation.cff
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add CITATION.cff
git commit -m "[Automatic] Update CITATION.cff files" || echo "Nothing to update"
git push origin HEAD:main
# - name: Build PDF
# uses: dita-ot/dita-ot-action@master
# with:
# install: |
# # Run some arbitrary installation commands
# apt-get update -q
# apt-get install -qy --no-install-recommends nodejs
# nodejs -v
# Install plugins
# dita install fox.jason.extend.css
# dita install org.doctales.xmltask
# dita install fox.jason.prismjs
# build: |
# # Use the dita command line
# dita --project=.github/dita-ot/pdf.xml -o out -f pdf
# - name: Upload DITA Output to a ZIP file
# uses: actions/upload-artifact@v2
# with:
# name: OCRD-GT-Guidelines
# path: 'out'
- name: Deploy DITA Output to GitHub Pages
uses: JamesIves/[email protected]
with:
GITHUB_TOKEN: $
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: out # The folder the action should deploy.