Skip to content

Instantly share code, notes, and snippets.

@Project516
Last active June 4, 2026 15:45
Show Gist options
  • Select an option

  • Save Project516/2eccafb22440aca4793fcae1efa6da94 to your computer and use it in GitHub Desktop.

Select an option

Save Project516/2eccafb22440aca4793fcae1efa6da94 to your computer and use it in GitHub Desktop.
Generate JavaDoc and deploy to GitHub Pages
name: Generate javadoc and deploy to GitHub Pages
on:
push:
branches:
[ "master" ]
jobs:
build:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v6
- name: Set up JDK
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: '21' # Replace with Java version
- name: Generate JavaDoc
run: ./gradlew javadoc
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build/docs/javadoc
force_orphan: 'true'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment