Skip to content

Fixed Typo and simplified key values. #175

Fixed Typo and simplified key values.

Fixed Typo and simplified key values. #175

Workflow file for this run

name: Deploy Versioned Javadoc (Manual Trigger)

Check failure on line 1 in .github/workflows/javadoc.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/javadoc.yml

Invalid workflow file

(Line: 24, Col: 5): A sequence was not expected
# Select the target TAG where to run the workflow from.
# This TAG name becomes the subdirectory under branch gh-pages/docs/${TAG}
# where the javadocs will be copied to.
on:
workflow_dispatch:
inputs:
tag_ref:
description: 'Existing Git Tag to deploy (e.g., 1.0.0)'
required: true
default: '1.0.0' # Default can be left blank or set to a placeholder
jobs:
build-and-deploy-javadoc:
runs-on: ubuntu-latest
permissions:
contents: write
pages: write
id-token: write
steps:
- name: Checkout Code at Specified Tag
uses: actions/checkout@v5
with:
ref: ${{ github.event.inputs.tag_ref }} # from manual trigger input
fetch-depth: 0
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '25'
distribution: 'temurin'
cache: 'maven'
- name: Build and Generate Javadoc
run: mvn javadoc:javadoc
- name: Deploy Javadoc to gh-pages/docs/${TAG}
env:
GH_PAGES_EMAIL: [email protected]
GH_PAGES_NAME: github-actions[bot]
GIT_TAG_NAME: ${{ github.event.inputs.tag_ref }}
TARGET_DIR: docs/${{ github.event.inputs.tag_ref }}
run: |
# 1. Configure Git user
git config user.email "${GH_PAGES_EMAIL}"
git config user.name "${GH_PAGES_NAME}"
# 2. Fetch and checkout the existing gh-pages branch
git fetch origin gh-pages:gh-pages
git checkout gh-pages
# 3. Clean up any previous documentation for this tag (optional, but safer)
rm -rf $TARGET_DIR
# 4. Create the versioned directory structure
mkdir -p $TARGET_DIR
# 5. Copy the generated Javadoc files into the versioned directory
cp -r target/reports/apidocs/* $TARGET_DIR/
# 6. Add the new directory and files, commit, and push
git add $TARGET_DIR
git commit -m "Manual Javadoc deployment for tag ${GIT_TAG_NAME} into $TARGET_DIR"
git push origin gh-pages