-
Notifications
You must be signed in to change notification settings - Fork 1
/
action.yml
61 lines (53 loc) · 1.62 KB
/
action.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
name: 'Logseq RDF Export'
description: 'Exports a subset of a Logseq graph to RDF'
inputs:
rdfFile:
description: "Name of RDF file to save export"
required: true
default: "test.ttl"
directory:
description: "Graph's root directory"
required: false
default: '.'
runs:
using: "composite"
steps:
- name: Checkout
uses: actions/checkout@v3
with:
repository: logseq/rdf-export
path: .logseq-rdf-export
- name: Set up Clojure
uses: DeLaGuardo/setup-clojure@master
with:
cli: 1.11.1.1182
bb: 1.0.164
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'yarn'
cache-dependency-path: .logseq-rdf-export/yarn.lock
- name: Fetch yarn deps
run: cd .logseq-rdf-export && yarn install --immutable
shell: bash
- name: Nbb cache
uses: actions/cache@v3
id: nbb-deps
with:
path: |
~/.m2/repository
~/.gitlibs
.logseq-rdf-export/.nbb/.cache
key: ${{ runner.os }}-nbb-deps-${{ hashFiles('.logseq-rdf-export/nbb.edn') }}
restore-keys: ${{ runner.os }}-nbb-deps-
- name: Fetch nbb deps
if: steps.nbb-deps.outputs.cache-hit != 'true'
run: cd .logseq-rdf-export && yarn nbb-logseq -e ':fetching-deps'
shell: bash
- name: Export graph to RDF
run: cd .logseq-rdf-export && node rdf_export.mjs ../${{ inputs.rdfFile }} --directory ${{ inputs.directory }}
shell: bash
- name: Validate RDF file
run: cd .logseq-rdf-export && yarn ttl ../${{ inputs.rdfFile}}
shell: bash