Skip to content

161 tropical cyclone th (#184) #37

161 tropical cyclone th (#184)

161 tropical cyclone th (#184) #37

name: Generate WIS2 Topic Hierarchy as TTL files and commit
on:
push:
branches:
- main
paths:
- '**.yml'
- 'topic-hierarchy/**.csv'
jobs:
main:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10']
steps:
- uses: actions/checkout@master
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Generate TTL files
run: |
python3 scripts/codelists2ttl.py
mv wis /tmp
- name: checkout gh-pages branch
uses: actions/checkout@master
with:
ref: gh-pages
- name: update gh-pages branch and publish
run: |
git config --global user.email "[email protected]"
git config --global user.name "Tom Kralidis"
mkdir -p wis
rm -rf wis/topic-hierarchy/*
cp -rpf /tmp/wis/topic-hierarchy/* wis
if [[ `git status --porcelain` ]]; then
git add .
git commit -am "update WIS2 Topic Hierarchy TTL files"
git push
else
echo "No changes to push"
fi