Skip to content

Commit

Permalink
Merge pull request #11 from OpenConext/feature/archimate-model
Browse files Browse the repository at this point in the history
Auto-generate html export of architecture model
  • Loading branch information
phavekes authored Oct 4, 2023
2 parents 6ec6ddf + 87f9fa3 commit 1298ed0
Show file tree
Hide file tree
Showing 5 changed files with 320 additions and 6 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ on:
pull_request:
branches: [main]

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:
tags:
- "*"

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
deployment:
permissions:
Expand Down
47 changes: 42 additions & 5 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,27 @@
---
name: make-doc
name: Update Documentation

# Triggers the workflow on push or pull request events
on:
workflow_dispatch:
push:
branches: [main]

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
test-redoc:
documentation:
runs-on: ubuntu-latest
name: Test documentation and generate openapi html documentation
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v3

with:
ref: ${{ github.head_ref }}
- name: lint markdown files
uses: nosborn/[email protected]
with:
Expand Down Expand Up @@ -55,13 +63,42 @@ jobs:
ls -al docs/api/
test -f docs/api/index.html || (echo "Missing docs/api/index.html from previous step." && exit 1)
- name: Commit files if the html has changed
- name: Commit files if the OpenAPI html has changed
run: |
git config user.name github-actions
git config user.email [email protected]
git pull
git add docs/api/index.html
git diff-index --quiet HEAD || git commit -m "Update github page"
continue-on-error: true

- uses: dorny/paths-filter@v2
id: changes
with:
filters: |
archi:
- 'docs/invite.archimate'
- name: Download Archi
run: |
curl "https://www.archimatetool.com/downloads/archi5.php?/5.1.0/Archi-Linux64-5.1.0.tgz" \
-q -o /tmp/archi.tgz
tar -zxvf /tmp/archi.tgz -C /tmp/
if: steps.changes.outputs.archi == 'true'
- name: Generate HTML report from Archimate model
run: |
xvfb-run /tmp/Archi/Archi -application com.archimatetool.commandline.app \
-nosplash --consoleLog --loadModel ./docs/invite.archimate \
--html.createReport "./docs/Archi/"
if: steps.changes.outputs.archi == 'true'

- name: Commit files if the Archimate html has changed
run: |
git config user.name github-actions
git config user.email [email protected]
git pull
git add docs/Archi/*
git diff-index --quiet HEAD || git commit -m "Update HTML export of Archimate file"
if: steps.changes.outputs.archi == 'true'
continue-on-error: true

- name: Push changes
uses: ad-m/github-push-action@master
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ node_modules/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/
!**/src/test/**/target/
docs/invite.archimate.bak
/yamllint-*

### STS ###
.apt_generated
Expand Down Expand Up @@ -37,4 +39,4 @@ dep.tree
provisioning.local.json
IgnoreMeTest.java
dependency.tree
NOTES.txt
NOTES.txt
Loading

0 comments on commit 1298ed0

Please sign in to comment.