Skip to content

ci:ok once more we remove this submodule shit, but we also trigger CI… #37

ci:ok once more we remove this submodule shit, but we also trigger CI…

ci:ok once more we remove this submodule shit, but we also trigger CI… #37

Workflow file for this run

name: Generate Public Ontology Docs
on:
push:
paths:
- 'src/ontology/arema-ontology.ttl'
- '.github/workflows/docs.yml'
- 'vendir.yml'
jobs:
build-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: false
- name: Install vendir
run: |
curl -L https://carvel.dev/install.sh | bash
- name: Sync Skohub Vocabs
run: cd external && vendir sync -f vendir.yml && cd ..
- name: Prepare clean public and data directories
run: |
rm -rf public data docs/public
mkdir -p public data
cp src/ontology/arema-ontology.ttl data/
echo "BASEURL=/$(basename $GITHUB_REPOSITORY)" > .env
- name: Run Skohub Vocabs (local checkout)
run: |
docker build -t skohub-vocabs ./skohub-vocabs
docker run --rm \
-v ${{ github.workspace }}/public:/app/public \
-v ${{ github.workspace }}/data:/app/data \
-v ${{ github.workspace }}/.env:/app/.env \
skohub-vocabs
rm -rf docs/*
cp -r public/* docs/
- name: Commit updated docs
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add docs
git diff --cached --quiet || git commit -m "Update docs via skohub-vocabs"
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}