-
Notifications
You must be signed in to change notification settings - Fork 6
40 lines (37 loc) · 1.29 KB
/
kpi.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
name: KPI documentation
on:
push:
paths:
- 'kpi/**'
env:
FILE_BASENAME: wcmp-1.3-kpi-DRAFT
jobs:
build-kpi:
name: Generate KPI documentation
runs-on: ubuntu-latest
steps:
- name: Install dependencies
run: |
sudo apt-get update -y \
&& sudo apt-get install -y asciidoctor ruby-asciidoctor-pdf pandoc
- name: checkout repository
uses: actions/checkout@v3
- name: build KPI documentation
run: |
mkdir -p /tmp/kpi \
&& asciidoctor --trace -o /tmp/kpi/${FILE_BASENAME}.html kpi/index.adoc \
&& asciidoctor --trace --backend docbook --out-file - kpi/index.adoc | pandoc --from docbook --to docx --output /tmp/kpi/${FILE_BASENAME}.docx \
&& asciidoctor --trace -r asciidoctor-pdf --trace -b pdf -o /tmp/kpi/${FILE_BASENAME}.pdf kpi/index.adoc
- name: checkout gh-pages branch
uses: actions/checkout@v3
with:
ref: gh-pages
- name: update gh-pages branch and publish
run: |
git checkout gh-pages
git config --global user.email "[email protected]"
git config --global user.name "Tom Kralidis"
mv -f /tmp/kpi/* kpi
git add .
git commit -am "update WMCP 1.3 KPI build"
git push