Deploy Reference Documentation #17
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |