Build documentation website #11
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: Build documentation website | |
on: [workflow_dispatch] | |
permissions: | |
id-token: write | |
env: | |
INSTANCE: 'Writerside/hi' | |
ARTIFACT: 'webHelpHI2-all.zip' | |
DOCKER_VERSION: '241.16003' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
pull-requests: write | |
contents: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Build docs using Writerside Docker builder | |
uses: JetBrains/writerside-github-action@v4 | |
with: | |
instance: ${{ env.INSTANCE }} | |
artifact: ${{ env.ARTIFACT }} | |
docker-version: ${{ env.DOCKER_VERSION }} | |
location: documentation-website | |
- name: Remove docs folder | |
run: rm -rf docs | |
- name: Unzip artifact | |
run: unzip -O UTF-8 -qq 'artifacts/${{ env.ARTIFACT }}' -d docs | |
- name: Revert logos | |
run: git checkout docs/logo-dark.png docs/logo-light.png docs/site.webmanifest | |
- name: Remove artifacts | |
run: rm -rf artifacts | |
- name: Setup Java | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'adopt' | |
java-version: '17' | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v2 | |
- name: Build API documentation with Dokka | |
run: ./gradlew dokkaHtmlMultiModule | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v6 | |
with: | |
branch: documentation-website | |
title: 'docs: Update documentation website' | |
commit-message: Update documentation website | |