-
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.
Merge pull request #11 from OpenConext/feature/archimate-model
Auto-generate html export of architecture model
- Loading branch information
Showing
5 changed files
with
320 additions
and
6 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
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
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,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: | ||
|
@@ -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 | ||
|
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.