forked from open223/explore.open223.info
-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (64 loc) · 2.28 KB
/
build-explorer.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
name: Build and Run NPM Package
on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: write
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build-and-run:
runs-on: ubuntu-latest
steps:
- name: Checkout Remote Repository
uses: actions/checkout@v3
- name: Clone RDF toolkit
run: git clone https://github.com/KrishnanN27/rdf-toolkit
- name: Set up Node.js
uses: actions/setup-node@v3
- name: Install Dependencies
working-directory: rdf-toolkit
run: |
npm ci
- name: Build NPM Package
working-directory: rdf-toolkit
run: |
npm run build
npm i @rdf-toolkit/cli
- name: Copy ontologies
run: cp ontologies/*.ttl rdf-toolkit/explorer/vocab
- name: Copy config file
run: cp rdfconfig.json rdf-toolkit/explorer/
- name: Build site
working-directory: rdf-toolkit/explorer
run: |
npx rdf add file "https://brickschema.org/schema/1.4/Brick" vocab/Brick.ttl
npx rdf add file "http://qudt.org/2.1/schema/shacl/qudt" vocab/SCHEMA_QUDT_NoOWL-v2.1.ttl
npx rdf add file "http://qudt.org/2.1/vocab/unit" vocab/VOCAB_QUDT-UNITS-ALL-v2.1.ttl
npx rdf add file "http://qudt.org/2.1/vocab/quantitykind" vocab/VOCAB_QUDT-QUANTITY-KINDS-ALL-v2.1.ttl
npx rdf add file "http://www.w3.org/ns/shacl" vocab/shacl.ttl
npx rdf add file "https://brickschema.org/schema/Brick/ref" vocab/ref-schema.ttl
npx rdf add file "https://w3id.org/rec" vocab/rec.ttl
npx rdf make site
- name: Commit Built Files
run: |
rm -rf html.explorer
mv rdf-toolkit/explorer/public html.explorer
git config user.name "GitHub Action"
git config user.email "[email protected]"
git add html.explorer
git diff --quiet --exit-code || git commit -m "Commit built files" && git push
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: 'html.explorer/'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2