-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto-generate html export of architecture model
- Loading branch information
Showing
3 changed files
with
302 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: | ||
|
@@ -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: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.