Skip to content

Commit

Permalink
Auto-generate html export of architecture model
Browse files Browse the repository at this point in the history
  • Loading branch information
phavekes committed Oct 3, 2023
1 parent 5b6123a commit 80994ff
Show file tree
Hide file tree
Showing 3 changed files with 302 additions and 3 deletions.
35 changes: 33 additions & 2 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
---
name: make-doc
name: Update Documentation

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

jobs:
test-redoc:
Expand Down Expand Up @@ -55,14 +58,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"
- 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
if: steps.changes.outputs.archi == 'true'
- name: Generate HTML report from Archimate model
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'

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

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

0 comments on commit 80994ff

Please sign in to comment.