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 4, 2023
1 parent 5b6123a commit 60dc279
Show file tree
Hide file tree
Showing 3 changed files with 310 additions and 6 deletions.
45 changes: 40 additions & 5 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@
---
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:
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 +61,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: |
/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 60dc279

Please sign in to comment.