Skip to content

Commit

Permalink
update docs ci
Browse files Browse the repository at this point in the history
  • Loading branch information
vendelieu committed Dec 31, 2024
1 parent b2c054a commit 58c0ab1
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions .github/workflows/ci.documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,18 @@ permissions:

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
needs: version
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -36,8 +40,18 @@ jobs:
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=${{ needs.version.outputs.version }} --no-parallel
run: ./gradlew :docs:dokkaGenerate -PlibVersion=${{ steps.vars.outputs.version }} --no-parallel

- name: Publish documentation
uses: JamesIves/github-pages-deploy-action@releases/v4
Expand Down

0 comments on commit 58c0ab1

Please sign in to comment.