Skip to content

Publish docs

Publish docs #7

name: Publish docs
on:
release:
types: [ created ]
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build_docs:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: executable
run: chmod a+x ./gradlew
- name: setup jdk
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'corretto'
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file
- name: generate docs
uses: gradle/gradle-build-action@v2
with:
arguments: dokkaHtml
- name: upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: build/dokka/html
deploy:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs: build_docs
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2