Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 13 additions & 14 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -213,32 +213,25 @@ jobs:
-rewriteAll \
-webVowl

# Default entry point (English)
cp "./_site/${VERSION}/doc/index-en.html" "./_site/${VERSION}/doc/index.html" || true

# ── Note: serializations are served by Widoco automatically ─────────────
# Widoco copies the source ontology file and generates download buttons
# for JSON-LD, RDF/XML, N-Triples, and TTL in the HTML documentation.
# The files are placed at the root of the doc/ output as ontology.jsonld,
# ontology.rdf, ontology.ntx, ontology.ttl — no manual copy needed.

# ── Update /dev/ ──────────────────────────────────────────────────────
# /dev/ always mirrors the latest build from main (every push).
# Named releases (e.g. /2025-11-20/ or /1.0.0/) are preserved alongside.
# This gives a stable URL for development/preview access.
# Always mirrors the latest build. On a qc build (no version payload)
# this is the only thing published — no versioned directory, no index
# update — keeping release history clean.
# ──────────────────────────────────────────────────────────────────────
- name: Update /dev/
run: |
VERSION="${{ needs.check.outputs.version }}"
rm -rf ./_site/dev
cp -r "./_site/${VERSION}" ./_site/dev

# ── Build root index.html ─────────────────────────────────────────────
# Generates a simple version listing page as the site root.
# Reads existing version directories from the previously fetched
# gh-pages branch and adds the current version to the list.
# ── Build root index.html (release only) ─────────────────────────────
# Only regenerated when a real version is provided (release trigger).
# qc builds only update /dev/ and skip this step.
# ──────────────────────────────────────────────────────────────────────
- name: Build root index.html
if: needs.check.outputs.version != 'latest'
run: |
VERSION="${{ needs.check.outputs.version }}"

Expand Down Expand Up @@ -323,6 +316,12 @@ jobs:
# rm -rf <version>/
# git commit -am "Remove version <version>" && git push
# ──────────────────────────────────────────────────────────────────────
# On qc builds (version = "latest") remove the _site/latest/ build dir —
# /dev/ already has the content; we don't want a permanent /latest/ page.
- name: Drop build dir for dev deploys
if: needs.check.outputs.version == 'latest'
run: rm -rf ./_site/latest

- name: Deploy to gh-pages branch
uses: peaceiris/actions-gh-pages@v4
with:
Expand Down
39 changes: 24 additions & 15 deletions .github/workflows/qc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,17 @@ on:
# Bot commits from this workflow touch only release artifacts (*.owl, *.ttl,
# *.json) which are NOT in the paths list below, so there is no infinite loop.
push:
branches: ["main"]
branches: [main]
paths:
- 'src/ontology/*-edit.owl'
- 'src/ontology/components/**'
- 'src/ontology/imports/**'
- 'src/ontology/Makefile'
- 'src/ontology/*-Makefile'
- src/ontology/*-edit.owl
- src/ontology/components/**
- src/ontology/imports/**
- src/ontology/Makefile
- src/ontology/*-Makefile

# ── Pull request: fast PR checks (no path filter — runs on every PR) ────────
pull_request:
branches: ["main"]
branches: [main]

# ── Manual trigger ──────────────────────────────────────────────────────────
workflow_dispatch:
Expand Down Expand Up @@ -317,20 +317,29 @@ jobs:
# ──────────────────────────────────────────────────────────────────────
- name: Build ontology (refresh imports + generate all release assets)
env:
ROBOT_ENV: 'ROBOT_JAVA_ARGS=-Xmx6G'
ROBOT_ENV: ROBOT_JAVA_ARGS=-Xmx6G
run: |
cd src/ontology
make refresh-imports all_assets

# ── Commit release artifacts ───────────────────────────────────────────
# git add each glob separately so a missing pattern (e.g. no *.json) does
# not abort the entire staging step.
- name: Stage release artifacts
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global --add safe.directory "$GITHUB_WORKSPACE"
git add src/ontology/*.owl || true
git add src/ontology/*.ttl || true
git add src/ontology/*.json || true
git add src/ontology/imports/*.owl || true

- name: Commit ontology release assets
uses: EndBug/add-and-commit@v9
with:
message: "Building the ontology from the edits"
cwd: "."
add: "src/ontology/*.owl src/ontology/*.json src/ontology/*.ttl src/ontology/imports/*.owl --force"
default_author: github_actions
push: true
run: |
git diff --cached --quiet && echo "Nothing to commit." && exit 0
git commit -m "Building the ontology from the edits"
git push

# ── Trigger documentation workflow ─────────────────────────────────────
- name: Trigger Documentation Workflow
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,12 @@ jobs:
- name: Stamp version into artifacts
run: |
VERSION="${{ steps.version.outputs.version }}"
ONTBASE="https://w3id.org/pmd/log"
for f in src/ontology/log-full.owl src/ontology/log-base.owl src/ontology/log-simple.owl src/ontology/log.owl; do
[ -f "$f" ] || continue
ODK_YAML=$(find src/ontology -maxdepth 1 -name "*-odk.yaml" | head -1)
ONT_ID=$(python3 -c "import yaml; d=yaml.safe_load(open('$ODK_YAML')); print(d['id'])")
URIBASE=$(python3 -c "import yaml; d=yaml.safe_load(open('$ODK_YAML')); print(d['uribase'])")
ONTBASE="${URIBASE}/${ONT_ID}"
for f in $(find src/ontology -maxdepth 1 -name "*.owl" \
! -name "*-edit.owl" ! -name "*-idranges.owl"); do
robot annotate \
--input "$f" \
--version-iri "${ONTBASE}/${VERSION}" \
Expand All @@ -117,7 +120,7 @@ jobs:
with:
message: Release v${{ steps.version.outputs.version }}
cwd: .
add: src/ontology/*.owl src/ontology/*.ttl --force
add: src/ontology/*.owl src/ontology/*.ttl
default_author: github_actions
push: true

Expand Down
10 changes: 0 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,6 @@ src/ontology/mirror
src/ontology/mirror/*
src/ontology/reports/*
!src/ontology/reports/release-diff.md
src/ontology/log.owl
src/ontology/log.obo
src/ontology/log.json
src/ontology/log.db
src/ontology/log-base.*
src/ontology/log-basic.*
src/ontology/log-full.*
src/ontology/log-simple.*
src/ontology/log-simple-non-classified.*

src/ontology/seed.txt
src/ontology/dosdp-tools.log
src/ontology/ed_definitions_merged.owl
Expand Down
Loading