Skip to content

02 - Publish Docs

02 - Publish Docs #36

name: "02 - Publish Docs"
on:
workflow_dispatch:
push:
branches:
- main
paths:
- CHANGELOG.md
jobs:
docs:
runs-on: ubuntu-latest
steps:
- name: Tune GitHub-hosted runner network
uses: smorimoto/tune-github-hosted-runner-network@v1
- uses: actions/checkout@v4
- run: ./scripts/is_release.sh >> $GITHUB_OUTPUT
id: build
- name: Set up Java
uses: actions/setup-java@v4
with:
java-version: "17"
distribution: "corretto"
cache: "gradle"
if: ${{ steps.build.outputs.release == 'true' }}
- uses: gradle/actions/setup-gradle@v4
if: ${{ steps.build.outputs.release == 'true' }}
- run: ./scripts/build_docs.sh ./build/docsite
if: ${{ steps.build.outputs.release == 'true' }}
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build/docsite
if: ${{ steps.build.outputs.release == 'true' }}