Skip to content

Commit

Permalink
Workflow enhancement: deploy Arc42 as GH-Page
Browse files Browse the repository at this point in the history
  • Loading branch information
stefan-ka committed Aug 3, 2023
1 parent 8c4a9bc commit b72e956
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 6 deletions.
68 changes: 62 additions & 6 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
name: master build
name: Build (master)

on:
push:
branches: [ "master" ]
tags-ignore:
- '**'
pull_request:
branches: [ "master" ]

Expand All @@ -21,11 +23,65 @@ jobs:
run: sudo apt-get -y install graphviz
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: Upload Architecture Documentation
uses: actions/upload-artifact@v3
- uses: actions/cache@v2
id: target-cache
with:
name: arc42-doc
path: |
target/generated-docs/ddd-cm-sample-architecture.pdf
path: ./target/*
key: ${{ github.sha }}
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1

upload_arc42_pdf:
name: Upload Architecture Documentation (PDF)
runs-on: ubuntu-latest
needs: [ build ]
steps:
- uses: actions/cache@v2
id: target-cache
with:
path: ./target/*
key: ${{ github.sha }}
- name: Upload Architecture Documentation
uses: actions/upload-artifact@v3
with:
name: arc42-doc
path: |
target/generated-docs/architecture.pdf
publish_gh_page:
name: Publish GH Page
runs-on: ubuntu-latest
needs: [ build ]
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v2
id: target-cache
with:
path: ./target/*
key: ${{ github.sha }}
- name: Setup Pages
uses: actions/configure-pages@v3
- uses: baileyjm02/markdown-to-pdf@v1
with:
input_dir: docs
output_dir: target/generated-docs
build_html: true
build_pdf: false
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: './target/generated-docs'
if-no-files-found: error
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
5 changes: 5 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
![Context Mapper](https://raw.githubusercontent.com/wiki/ContextMapper/context-mapper-dsl/logo/cm-logo-github-small.png)
# Context Mapper: Three Letter Abbreviation (TLA) Sample App - Documentation

* [Arc42 Documentation (Website)](https://contextmapper.org/ddd-cm-tla-sample-application/architecture.html)
* [Arc42 Documentation (PDF)](https://contextmapper.org/ddd-cm-tla-sample-application/architecture.pdf)
File renamed without changes.

0 comments on commit b72e956

Please sign in to comment.