-
Notifications
You must be signed in to change notification settings - Fork 1
64 lines (52 loc) · 1.8 KB
/
deploy.yml
File metadata and controls
64 lines (52 loc) · 1.8 KB
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: Build & Deploy MkDocs with ROBOT
on:
push:
branches: [ main ]
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install Python dependencies
run: |
if [ -f requirements.txt ]; then
pip install -r requirements.txt
else
# Fallback if no requirements.txt present
pip install mkdocs-material mkdocs-gen-files mkdocs-macros-plugin pandas rdflib
fi
- name: Set up Java (for ROBOT)
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: "17"
- name: Install ROBOT
run: |
curl -L -o robot.jar https://github.com/ontodev/robot/releases/latest/download/robot.jar
echo '#!/usr/bin/env bash' > robot
echo 'set -euo pipefail' >> robot
echo 'java -Xmx4G -jar "$(dirname "$0")/robot.jar" "$@"' >> robot
chmod +x robot
sudo mv robot robot.jar /usr/local/bin/
robot --version
- name: Build site (runs ROBOT through your MkDocs gen-files script)
env:
ONTOLOGY_DIRS: Ontologies
PATTERNS_DIR: "Patterns"
MEASURE_LEVEL: extended # or all / all-reasoner
run: mkdocs build --clean
- name: Configure git author (for gh-deploy commit)
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Deploy to GitHub Pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: mkdocs gh-deploy --force