Skip to content

7.8.0 (#323)

7.8.0 (#323) #7

name: Documentation
permissions:
contents: write
on:
workflow_dispatch:
inputs:
version:
description: 'Version to publish'
required: true
type: string
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+"
jobs:
documentation:
name: Publish documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 17
- name: Setup gradle
uses: gradle/actions/setup-gradle@v4
with:
gradle-version: current
- name: Cache konan dependencies
uses: actions/cache@v4
with:
path: ~/.konan
key: ${{ runner.os }}-gradle-${{ hashFiles('**/libs.versions.toml')}}
restore-keys: |
${{ runner.os }}-gradle-
- name: Determine version
id: vars
run: |
if [ "${{ github.event_name }}" == "push" ]; then
echo "version=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
else
echo "version=${{ github.event.inputs.version }}" >> $GITHUB_OUTPUT
fi
shell: bash
- name: Generate docs
run: ./gradlew :docs:dokkaGenerate -PlibVersion=${{ steps.vars.outputs.version }} --no-parallel
- name: Publish documentation
uses: JamesIves/github-pages-deploy-action@releases/v4
with:
BRANCH: gh-pages
FOLDER: docs/build/dokka/html