-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (57 loc) · 1.73 KB
/
generate_documentation.yml
File metadata and controls
68 lines (57 loc) · 1.73 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
68
name: Generate Documentation
on:
workflow_dispatch:
push:
branches: [main]
paths:
- 'rdf/processed/shapes.ttl'
pull_request:
branches: [main]
paths:
- 'rdf/processed/shapes.ttl'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: write
env:
SHACL_PLAY_VERSION: "0.12.0"
jobs:
run-pipeline:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set up uv
uses: astral-sh/setup-uv@v5
with:
python-version: "3.12"
enable-caching: true
- name: Install system dependencies
run: sudo apt-get install -y libssh2-1-dev graphviz
- name: Install dependencies
run: uv sync
- name: Restore SHACL-Play JAR cache
id: cache-jar
uses: actions/cache/restore@v4
with:
path: service/shacl_play
key: shacl-play-jar-${{ env.SHACL_PLAY_VERSION }}
- name: Run documentation script
run: |
uv run python service/shacl_docgen.py --diagram
- name: Save SHACL-Play JAR cache
if: steps.cache-jar.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: service/shacl_play
key: shacl-play-jar-${{ env.SHACL_PLAY_VERSION }}
- name: Commit and push changes
if: github.event_name != 'pull_request'
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add .
git diff --cached --quiet || git commit -m "Update documentation [skip ci]"
git push origin HEAD:${{ github.ref_name }}