Skip to content

Publish Documentation #51

Publish Documentation

Publish Documentation #51

Workflow file for this run

name: Publish Documentation
on:
workflow_run:
workflows: [ "Release" ]
types: [ completed ]
push:
branches:
- documentation
jobs:
build:
name: Check materials and publish if tagged
runs-on: ubuntu-latest
steps:
- name: Fetch source code
uses: actions/checkout@v4.2.2
- name: Set up JDK 21
uses: actions/setup-java@v4.5.0
with:
distribution: 'zulu'
java-version: 21
- name: Cache Maven packages
uses: actions/cache@v4.1.2
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Generate JavaDoc
run: mvn compile javadoc:javadoc
- name: Deploy JavaDoc on GH-Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./target/site/apidocs
keep_files: false
- name: QA check Markdown content
uses: nosborn/github-action-markdown-cli@v3.1.0
with:
files: docs/
- name: Check links in markdown
uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
folder-path: 'docs/'
- name: Run mdBook
uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: "latest"
- run: |
mdbook build
- name: Deploy Book on GH-Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./target/docs
destination_dir: ./book
keep_files: true