💚 Authorization variable adjustment #2
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: Publish Javadoc to GitHub Pages | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build-and-publish-javadoc: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
java-version: '21' | |
distribution: 'temurin' | |
- uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0 | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Build project and generate Javadoc | |
run: | | |
./gradlew clean javadoc | |
- name: Commit changes | |
run: | | |
git config user.name github-actions[bot] | |
git config user.email github-actions[bot]@users.noreply.github.com | |
git add -A | |
git commit -m ":memo: Deploy id ${{ github.run_id }}" || true | |
- name: Deploy Javadoc to gh-pages | |
uses: peaceiris/actions-gh-pages@v4 | |
with: | |
publish_dir: ./build/docs/javadoc | |
github_token: ${{ secrets.TOKEN }} | |
commit_message: ":memo: Deploy id ${{ github.run_id }} | " |