Skip to content

Deploy Reference Documentation #86

Deploy Reference Documentation

Deploy Reference Documentation #86

name: Deploy Reference Documentation
on:
workflow_dispatch:
inputs:
version:
description: 'SDK Version'
required: true
type: string
permissions:
id-token: write
jobs:
deploy-reference-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout main branch
uses: actions/checkout@v4
with:
ref: main
- name: Configure Git
run: |
git config --global user.email "[email protected]"
git config --global user.name "eg-oss-ci"
- name: Checkout gh-pages branch
run: |
git fetch origin mdwairi/add-version-json-files
git checkout mdwairi/add-version-json-files
- name: Copy directories
run: |
find . -maxdepth 1 -mindepth 1 -type d -exec cp -r {} $GITHUB_WORKSPACE \;
- name: Switch back to main branch
run: |
git checkout main
mkdir -p previous-versions
find $GITHUB_WORKSPACE -maxdepth 1 -mindepth 1 -type d -exec mv {} previous-versions/ \;
- name: List contents of previous-versions (debug step)
run: |
echo "Contents of previous-versions directory:"
ls -la previous-versions
- name: Run Dokka to generate new docs
run: |
mvn -f code dokka:dokka -Ddokka-previous-versions.location=previous-versions
- name: Test
run: |
cd ./code/target/dokka
ls