Skip to content

Merge pull request #129 from wmo-im/issue-127 #57

Merge pull request #129 from wmo-im/issue-127

Merge pull request #129 from wmo-im/issue-127 #57

Workflow file for this run

name: build specification and KPIs
on:
push:
branches:
- main
paths:
- 'standard/**'
- 'kpi/**'
env:
SPEC_FILE_BASENAME: wis2-notification-message-DRAFT
KPI_FILE_BASENAME: wis2-notification-message-kpi-DRAFT
jobs:
build-wis2-notification-message:
name: Build WIS2 Notification Message documentation
runs-on: ubuntu-latest
steps:
- name: Install dependencies
run: |
sudo apt-get update -y \
&& sudo apt-get install -y pandoc \
&& sudo gem install asciidoctor asciidoctor-pdf
- name: checkout repository
uses: actions/checkout@v3
- name: build specification
run: |
cd standard \
&& asciidoctor --trace -o /tmp/wis2-notification-message/standard/${SPEC_FILE_BASENAME}.html index.adoc \
&& asciidoctor --trace --backend docbook --out-file - index.adoc | pandoc --from docbook --to docx --output /tmp/wis2-notification-message/standard/${SPEC_FILE_BASENAME}.docx \
&& asciidoctor --trace -r asciidoctor-pdf --trace -b pdf -o /tmp/wis2-notification-message/standard/${SPEC_FILE_BASENAME}.pdf index.adoc \
&& cd ..
- name: build KPIs
run: |
cd kpi \
&& asciidoctor --trace -o /tmp/wis2-notification-message/kpi/${KPI_FILE_BASENAME}.html index.adoc \
&& asciidoctor --trace --backend docbook --out-file - index.adoc | pandoc --from docbook --to docx --output /tmp/wis2-notification-message/kpi/${KPI_FILE_BASENAME}.docx \
&& asciidoctor --trace -r asciidoctor-pdf --trace -b pdf -o /tmp/wis2-notification-message/kpi/${KPI_FILE_BASENAME}.pdf index.adoc \
&& cd ..
- 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 "tomkralidis@gmail.com"
git config --global user.name "Tom Kralidis"
rm -rf standard kpi
mv -f /tmp/wis2-notification-message/* .
git add .
git commit -am "update WNM build"
git push