Skip to content

Deploy Reference Documentation #17

Deploy Reference Documentation

Deploy Reference Documentation #17

name: Generate and Deploy Reference Documentation
on:
workflow_dispatch:
inputs:
version:
description: 'SDK Version'
required: true
type: string
# push:
# branches:
# - mohnoor94/docs
# - main
permissions:
id-token: write
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'corretto'
java-version: '21'
- run: mvn -f code/sdk dokka:dokka
- name: Checkout gh-pages branch
run: |
git fetch --all
git checkout gh-pages
git pull origin gh-pages
# mv code/sdk/build/dokka/* to a new folder with the version number
mkdir -p ${{ github.event.inputs.version }}
mv code/sdk/build/dokka/* ${{ github.event.inputs.version }}
git add .
- name: Commit and push changes
run: |
git config --global user.email "[email protected]"
git config --global user.name "eg-oss-ci"
git commit -m "publishing docs for version ${{ github.event.inputs.version }}"
git push origin gh-pages