forked from kba/gt-guidelines
-
Notifications
You must be signed in to change notification settings - Fork 1
173 lines (129 loc) · 5.52 KB
/
new6.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
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.