Skip to content

Merge updates from https://github.com/nfdi4cat/voc4cat-template #26

Merge updates from https://github.com/nfdi4cat/voc4cat-template

Merge updates from https://github.com/nfdi4cat/voc4cat-template #26

Workflow file for this run

# This action runs when a release is created and on merges to main.
#
# Workflow steps:
# - create joined vocabulary file in addition to split version
# - create excel-file from turtle
# - build docs
# - publish docs, vocabulary-turtle files and excel-file to gh-pages
name: Build & Publish
on:
push:
branches:
- main
tags:
- v[0-9]+.[0-9]+.[0-9]+
workflow_dispatch:
env:
FORCE_COLOR: "1" # Make tool output pretty.
PIP_DISABLE_PIP_VERSION_CHECK: "1"
PIP_PROGRESS_BAR: "off"
LOGLEVEL: "DEBUG"
jobs:
build:
name: Build vocabulary & documentation
permissions:
# Required for peaceiris/actions-gh-pages below
contents: write
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -VV
python -m pip install --upgrade pip setuptools wheel
# install tagged version
python -m pip install git+https://github.com/nfdi4cat/voc4cat-tool.git@v0.6.2
# python -m pip install git+https://github.com/nfdi4cat/voc4cat-tool.git@main
- name: Run voc4cat (publish joined & split SKOS/turtle)
run: |
voc4cat --version
cp -r vocabularies/ publish/
# Build joined turtle
voc4cat transform --logfile publish/voc4cat.log --join publish/
- name: Run voc4cat (build HTML documentation)
run: |
voc4cat docs --force --logfile publish/voc4cat.log publish/
- name: Run voc4cat (build current Excel file)
run: |
voc4cat convert --logfile publish/voc4cat.log --template templates/voc4cat_template_043.xlsx publish/
ls -l publish/ || echo "publish directory does not exist."
- name: Deploy documentation & SKOS/turtle & xlsx
# Pin third party action (v3.9.3)
uses: peaceiris/actions-gh-pages@373f7f263a76c20808c831209c920827a82a2847
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./publish
force_orphan: true
- name: Store publish dir (=pages) as artifact
# This step is not required and may be removed.
# It may be helpful for trouble shooting.
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: voc4cat-pages-content
path: publish/
# Lit:
# https://github.com/peaceiris/actions-gh-pages