add Global Replay (#17) #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Generate WCMP2 Codelists as TTL files and commit | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- '**.yml' | |
- 'codelists/**.csv' | |
jobs: | |
main: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ['3.10'] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
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@v3 | |
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" | |
rm -rf wis/* | |
cp -rpf /tmp/wis/* . | |
if [[ `git status --porcelain` ]]; then | |
git add . | |
git commit -am "update WMCP2 Codelists TTL files" | |
git push | |
else | |
echo "No changes to push" | |
fi |