-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (41 loc) · 1.18 KB
/
documentation.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Ontology Documentation
on:
push:
paths:
- '*.owl'
- '*.ttl'
- '*.rdf'
workflow_dispatch:
jobs:
generate-docs:
runs-on: ubuntu-latest
steps:
# Step 1: Check out the repository
- name: Checkout repository
uses: actions/checkout@v3
# Step 2: Set up Python
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.8'
# Step 3: Install Ontospy
- name: Install Ontospy
run: |
python -m pip install --upgrade pip
pip install ontospy
# Step 4: Generate Documentation
- name: Generate Ontology Documentation
run: |
for file in *.ttl *.owl *.rdf; do
if [[ -f "$file" ]]; then
mkdir -p docs/"${file%.*}"
ontospy gendocs --type 1 -o docs/"${file%.*}" "$file"
echo "Documentation generated for: $file"
fi
done
# Step 5: Deploy Documentation to GitHub Pages
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs