chore(deps): update actions/setup-java action to v4.2.1 #469
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: Gradle Deployment | |
on: | |
push: | |
branches: | |
- "main" | |
tags: | |
- "**" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
- name: Set up JDK 21 | |
uses: actions/[email protected] | |
with: | |
distribution: 'temurin' | |
java-version: '21' | |
- name: Setup Gradle | |
uses: gradle/actions/[email protected] | |
- run: chmod +x ./gradlew | |
- name: Publish artifacts | |
run: ./gradlew publish -P box.release=${{ startsWith(github.ref, 'refs/tags/') }} | |
- name: Generate Javadocs | |
run: ./gradlew aggregateJavadoc -P box.release=${{ startsWith(github.ref, 'refs/tags/') }} | |
- name: Create top and not-found pages | |
run: | | |
cp -f assets/gh-pages.html staging/index.html | |
cp -f assets/gh-pages.html staging/404.html | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./staging | |
keep_files: true | |
allow_empty_commit: true |