-
Notifications
You must be signed in to change notification settings - Fork 0
89 lines (77 loc) · 3.27 KB
/
cd_update_pages.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: Update GitHub Pages
on:
push:
branches:
- main
tags:
- 'v*.*.*'
env:
GIT_USER_NAME: CHAMEO Developers
GIT_USER_EMAIL: "[email protected]"
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v4
- name: Debug info
run: |
echo GITHUB_REF_NAME=${GITHUB_REF_NAME}
- name: Setup Python 3.11
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Install ROBOT
run: |
mkdir bin
wget -nv https://github.com/ontodev/robot/releases/download/v1.9.6/robot.jar
mv robot.jar bin/.
curl https://raw.githubusercontent.com/ontodev/robot/master/bin/robot > bin/robot
chmod +x bin/robot
ls -l bin/
- name: Install dependencies
run: |
pip install --upgrade pip
pip install sphinx sphinxcontrib-globalsubs sphinx_design nbsphinx pydata-sphinx-theme
pip install git+https://github.com/emmo-repo/EMMOntoPy.git@get_datatype_class
#pip install git+https://github.com/emmo-repo/EMMOntoPy.git@master
#pip install sphinx EMMOntoPy
- name: Create and prepare build and public directories
run: |
mkdir build public
if [ -d doc/_static ]; then cp -rf doc/_static/* build/. ; fi
- name: Create ontologies for publishing
run: |
ontoconvert \
-sawe \
--base-iri="https://w3id.org/emmo/application/superhydrophobic-nanopatterned-surface#" \
--iri=https://w3id.org/emmo/application/superhydrophobic-nanopatterned-surface \
superhydrophobic-nanopatterned-surface.ttl public/superhydrophobic-nanopatterned-surface.ttl
#bin/robot reason --reasoner ELK --input public/superhydrophobic-nanopatterned-surface.ttl --output public/superhydrophobic-nanopatterned-surface-inferred.ttl
ontoconvert public/superhydrophobic-nanopatterned-surface.ttl public/superhydrophobic-nanopatterned-surface.owl
#ontoconvert public/superhydrophobic-nanopatterned-surface-inferred.ttl public/superhydrophobic-nanopatterned-surface-inferred.owl
- name: Generate html documentation
run: |
#ontodoc \
# --iri-regex=https://w3id.org/emmo/application/superhydrophobic-nanopatterned-surface \
# public/superhydrophobic-nanopatterned-surface-inferred.ttl \
# build/superhydrophobic-nanopatterned-surface.rst
ontodoc \
--iri-regex=https://w3id.org/emmo/application/superhydrophobic-nanopatterned-surface \
public/superhydrophobic-nanopatterned-surface.ttl \
build/superhydrophobic-nanopatterned-surface.rst
cp README.md build/
sphinx-build "build/" "public/"
- name: Publish on GitHub Pages
uses: peaceiris/actions-gh-pages@v4
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
#keep_files: true
#external_repository: emmo-repo.github.io/application-superhydrophobic-nanopatterned-surface
#publish_branch: main
#force_orphan: true