-
Notifications
You must be signed in to change notification settings - Fork 4
67 lines (58 loc) · 2.09 KB
/
Copy pathdeploy.yaml
File metadata and controls
67 lines (58 loc) · 2.09 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
65
66
67
name: deploy
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: main
path: main
- name: Build widoco and docs
run: |
# install D2
curl -fsSL https://d2lang.com/install.sh | sh -s --
pip install mkdocs-d2-plugin
pip install mkdocs-i18n
pip install pymdown-extensions
pip install mkdocs-pymdownx-material-extras
wget -O widoco.jar https://github.com/dgarijo/Widoco/releases/download/v1.4.25/widoco-1.4.25-jar-with-dependencies_JDK-11.jar
mkdir public
java -jar widoco.jar -ontFile main/lp.ttl -outFolder public -uniteSections -includeAnnotationProperties -lang en-de -getOntologyMetadata -noPlaceHolderText -rewriteAll -webVowl
ls public
echo -e "\n img { max-width:1000px }" >> public/doc/resources/extra.css
cat public/doc/resources/extra.css
cp public/doc/index-en.html public/doc/index.html
cp -r public/doc 1.0.0
cp -r public/doc/* public/
mv 1.0.0 public/
pip install mkdocs
cd main
mkdocs build -f mkdocs.yaml
cd ..
mkdir public/docs
cp -r main/site/* public/docs/
# pattern for old versions
#
# - uses: actions/checkout@v3
# with:
# ref: v1.0.0
# path: v1.0.0
# - name: Build widoco and docs for 1.0.0
# run: |
# mkdir public/1.0.0
# java -jar widoco.jar -ontFile v1.0.0/lp.ttl -outFolder public/1.0.0 -uniteSections -includeAnnotationProperties -lang en-de -getOntologyMetadata -noPlaceHolderText -rewriteAll -webVowl
# ls public/1.0.0/
# mv public/1.0.0/doc/* public/1.0.0/
# cp public/1.0.0/index-en.html public/1.0.0/index.html
- name: Deploy to GitHub Pages
if: success()
uses: crazy-max/ghaction-github-pages@v3
with:
target_branch: gh-pages
build_dir: public/
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}