-
Notifications
You must be signed in to change notification settings - Fork 1
169 lines (137 loc) · 5.27 KB
/
keyboardGT.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
name: keyboardGT
'on':
push:
branches:
- main
workflow_dispatch:
jobs:
cli:
name: keyboardGT
runs-on: ubuntu-latest
steps:
- name: Git checkout
uses: actions/checkout@v2
# Installation and Directories
- name: Get SDK Version from config
id: lookupSdkVersion
uses: mikefarah/yq@master
with:
cmd: |
yq -o=json CITATION.cff > CITATION.json
- name: Download and install saxon
run: |
wget https://github.com/Saxonica/Saxon-HE/releases/download/SaxonHE12-3/SaxonHE12-3J.zip
unzip SaxonHE12-3J.zip
- name: Make gh-pages_out, keyboards, doc folder
run: |
mkdir ghout
mkdir ghout/keyboards
mkdir ghout/keyboards/aletheia
mkdir ghout/keyboards/transkribus
mkdir ghout/keyboards/LAREX
mkdir ghout/keyboards/qurator-neat
mkdir ghout/keyboards/escriptorium
mkdir ghout/doc
mkdir keyboards
# Transformation and analysis
- name: Transform MUFI snapshot to Aletheia keyboard
run: |
java -jar saxon-he-12.3.jar -xsl:scripts/keyboard.xsl output=keyboards \
-s:scripts/keyboard.xsl
shell: bash
- name: Transform MUFI snapshot to Transkribus keyboard
run: |
java -jar saxon-he-12.3.jar -xsl:scripts/keyboard.xsl output=tkeyboards \
-s:scripts/keyboard.xsl
shell: bash
- name: Transform MUFI snapshot to LAREX keyboard
run: |
java -jar saxon-he-12.3.jar -xsl:scripts/keyboard.xsl output=lkeyboards \
-s:scripts/keyboard.xsl
shell: bash
- name: Transform MUFI snapshot to qurator-neat keyboard
run: |
java -jar saxon-he-12.3.jar -xsl:scripts/keyboard.xsl output=qkeyboards \
-s:scripts/keyboard.xsl
shell: bash
- name: Transform MUFI snapshot to eScriptorium keyboard
run: |
java -jar saxon-he-12.3.jar -xsl:scripts/keyboard.xsl output=ekeyboards \
-s:scripts/keyboard.xsl
shell: bash
- name: Make compressed table view
run: |
java -jar saxon-he-12.3.jar -xsl:scripts/keyboard.xsl output=keytable release=$GITHUB_RUN_NUMBER \
-s:scripts/keyboard.xsl -o:ghout/overview.md
shell: bash
- name: generate CITATION.cff
run: |
java -jar saxon-he-12.3.jar -xsl:scripts/metadata.xsl \
output=CITATION repoBase=$GITHUB_REF_Name repoName=$GITHUB_REPOSITORY bagitDumpNum=$GITHUB_RUN_NUMBER releaseTag=$GITHUB_REF_NAME \
-s:scripts/metadata.xsl -o:rawCITATION.cff
shell: bash
- name: formating CITATION.cff
id: lookupSdkVersion2
uses: mikefarah/yq@master
with:
cmd: |
yq -I4 rawCITATION.cff > CITATION.cff
# GH-style
- name: Copy css styles, keyboards, docs and yml files
run: |
cp scripts/table_hide.css ghout/
cp scripts/_config.yml ghout/
cp docu/* ghout/doc/
cp -r ghout/keyboards/* keyboards/
- name: Archive the keyboard files
uses: thedoctor0/zip-release@master
with:
filename: site.zip
path: 'keyboards'
# GitHub release
- name: Create GitHub release
id: create-new-release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ github.run_number }}
release_name: Keyboard-zip-package (Release${{ github.run_number }})
body: |
<dl>
<dt>Version:</dt>
<dd>Keyboard-zip-package (Release${{ github.run_number }}_${{ github.ref_name }})</dd>
<dt>Info:</dt>
<dd>
The file Keyboard-zip-package-v${{ github.run_number }}.zip is a zip archive file.<br/>
<ul><li>If you wish to use the rules, this file must first be unpacked.</li>
<li>The archive file contains virtual keyboards for various transcription editors or tools.</li>
<li>The keyboards are categorized according to the MUFI category scheme.</li>
<li>The column <i>💁 Browse by code chart (Link to MUFI)</i> provides an overview of the scope of the respective keyboard.</li></ul>
</dd>
</dl>
</dl>
draft: false
prerelease: false
- name: Upload asset to GitHub release
uses: actions/upload-release-asset@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create-new-release.outputs.upload_url }}
asset_path: ./site.zip
asset_name: keyboardGT-v${{ github.run_number }}.zip
asset_content_type: application/zip
- 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: Deploy GT-Overview to GitHub Pages
uses: JamesIves/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: ghout # The folder the action should deploy.