Skip to content

v0.4.0

v0.4.0 #14

Workflow file for this run

name: publish
on:
release:
types: [published]
env:
FILE_BASENAME: cdms-functional-requirements-DRAFT
jobs:
build-and-publish:
name: Build and publish
runs-on: ubuntu-latest
steps:
- name: Install dependencies
run: |
sudo apt-get update -y \
&& sudo apt-get install -y graphviz pandoc librsvg2-bin default-jre \
&& sudo gem install asciidoctor asciidoctor-pdf asciidoctor-diagram asciidoctor-diagram-plantuml \
&& sudo npm install -g asciidoc-link-check
- name: Checkout main
uses: actions/checkout@v6.0.2
- name: Build
run: |
set -o pipefail \
&& mkdir -p /tmp/build/static \
&& cd standard \
&& sed -i "s/@@VERSION@@/${GITHUB_REF_NAME}/g" index.adoc \
&& asciidoctor --trace -r asciidoctor-diagram -a stylesheet=static/wmo-asciidoc.css -a revnumber=${GITHUB_REF_NAME} -o /tmp/build/${FILE_BASENAME}.html index.adoc \
&& asciidoctor --trace -r asciidoctor-diagram -r asciidoctor-pdf -a pdf-theme=static/theme.yml -a revnumber=${GITHUB_REF_NAME} --trace -b pdf -o /tmp/build/${FILE_BASENAME}.pdf index.adoc \
&& asciidoctor --trace -r asciidoctor-diagram -a revnumber=${GITHUB_REF_NAME} --backend docbook --out-file - index.adoc | pandoc --from docbook --to docx --reference-doc static/custom-reference.docx --number-sections --toc --output /tmp/build/${FILE_BASENAME}.docx \
&& cp static/wmo-asciidoc.css /tmp/build/static/ \
&& cp static/wmo-logo-en.png /tmp/build/static/
- name: verify build
run: ls -la /tmp/build/ && ls -la /tmp/build/static/
- name: Check out pages branch
uses: actions/checkout@v6.0.2
with:
ref: gh-pages
- name: Copy files
run: |
git config --global user.email "dberry@wmo.int" \
&& git config --global user.name "David I. Berry" \
&& ls -althF . \
&& rm -rf compiled/* \
&& mv /tmp/build/* compiled/ \
&& git add . \
&& git commit -m "Update ${FILE_BASENAME} files" \
&& git push